提交时间:2022-08-03 17:26:19
运行 ID: 56993
#include<bits/stdc++.h> using namespace std; int t,tt,a[100010],ans,sum; int main(){ cin>>t>>tt; for(int i=t;i<=tt;i++){ int j=i,sum=1; memset(a,0,sizeof(a)); for(int k=2;k<=j/k;k++){ while(j%k==0){ j/=k; a[k]++; } } for(int k=2;k<=i/k;k++) sum*=(a[k]+1); if(j>1) sum*=2; ans+=sum; } cout<<ans; return 0; }