#include<stdio.h> int main() { float length,n=0.0; int j=1; scanf("%f",&length); while(length<=5.20&&length!=0.0) { j++; n+=1.0/j; if(n>=length) { printf("%d card(s)\n",j-1); j=1; n=0.0; scanf("%f",&length); } } return 0; }
poj1003
最新推荐文章于 2019-10-07 21:53:36 发布