| ||||||||||
| 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 | |||||||||
ac#include <stdio.h>
int main(int agrc, char *argv[])
{
float c, s;
int i;
while (scanf("%f", &c) == 1)
{
if (c == 0.00)
{
break;
}
s = 0;
i = 0;
while (s < c)
{
++i;
s = s + 1.0/(i+1);
}
printf("%d card(s)\n", i);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator