2011清华考研机试题2
[url]http://ac.jobdu.com/problem.php?id=1087[/url] 水~ [code="c++"] #include #include #include using namespace std; long long solved(long long key) { long long ans=0; if(key==1) return 1; for(long long i=1;i<=sqrt(key);i++) { if(key % i==0) if(i==sqrt(key)) { ans++; } else { ans+=2; } } return ans; } int main() { int n; while(cin>>n) { if(!n) break; for(int i=0;i