提交时间:2022-08-03 17:48:19

运行 ID: 57055

#include<bits/stdc++.h> using namespace std; int t,t1,ans=1,n; int main(){ cin>>t>>t1; for(int i=t;i<=t1;i++){ int m,s; m=i; s=0; for(int j=2;j<=sqrt(m);j++){ if(m%j==0){ while(m%j==0) m/=j,s++; } ans*=(s+1); } n+=ans; } cout<<n-1; return 0; }