| ||||||||||
| 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 | |||||||||
Problems1405 为什么wa,都用手算了#include<iostream>
using namespace std;
int main()
{
int N,i,j;
double a=0;
cin>>N;
for(i=1;i<18;i++)
{
a=0;
for(j=i;j<(i+N);j++)
{
a+=1.0/(double)j;
}
if(a<1)
break;
}
for(j=0;j<N;j++)
cout<<i++<<endl;
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator