#include <stdio.h> int main(){ float c; while(scanf("%f",&c) && c){ int a=1,num=0; float sum=0, b=0.5; do{ sum = sum+b; num++;a++; b = 1.00/(a+1); }while (sum<c&&num<276); printf("%d%s\n",num," card(s)"); } return 0; }
poj-1003
猜你喜欢
转载自blog.csdn.net/xin_rong/article/details/79462151
今日推荐
周排行