最大分解
#includeusing namespace std; int n; int x; long long ans=0; int main(){ cin>>n; x=n; int tmp=x-1; while(x!=1){ if(x%tmp==0){ ans+=tmp; x=tmp; tmp-=1; } else{ tmp-=1; } } cout<

最大分解
#includeusing namespace std; int n; int x; long long ans=0; int main(){ cin>>n; x=n; int tmp=x-1; while(x!=1){ if(x%tmp==0){ ans+=tmp; x=tmp; tmp-=1; } else{ tmp-=1; } } cout<