标签:
#include <iostream> #include <cmath> #include <cstdio> using namespace std; int main() { int n; while(cin>>n) { int m = (int)sqrt(n); int sum = 0; for(int i=m*2; i>=2; i--) { if( (2*n+i-i*i)%(2*i)==0 && (2*n+i-i*i)>0 ) { cout<<(2*n+i-i*i)/(i*2)<<endl; sum++; } } if(!sum) puts("No Solution"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/yoyo-sincerely/p/5656770.html