POJ1003:Hangover

来源:互联网 发布:区域软件 编辑:程序博客网 时间:2024/04/30 05:50
 
#include <stdio.h>#include <iostream>#include <math.h>using namespace std;int main(){double len;//Lengthwhile(cin>>len&&len!=0){int s=0;//累加和double l=0;//出边和while(l<len){l+=(double)1/(double)(s+2);++s;}cout<<s<<" card(s)"<<endl;}return 0;}

0 0
原创粉丝点击