Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:超水!! 0MS就ok 代码共享In Reply To:超水!! 0MS就ok 代码共享 Posted by:z1160y at 2009-05-23 01:52:54 > #include <iostream> > using namespace std; > int main() > { > int N; > double x; > int count=1,sum; > int tempory; > double a1; > cin>>N; > while(count<=N) > { cin>>tempory>>x; > sum=0; > for(int n=2;n<=70000;n++) > { > a1=(2.0*x/n-n+1)/2; > if(a1>0&&a1==long(a1)) sum++; > if(a1<=0) break; > } > cout<<count<<" "<<sum<<endl; > count++; > } > return 0; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator