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 |
Re:感觉对的代码AC不了,感觉错的代码却AC了,真郁闷In Reply To:感觉对的代码AC不了,感觉错的代码却AC了,真郁闷 Posted by:yunyifly at 2007-05-30 21:03:07 #include<iostream> using namespace std; int main() { double len, total; while(1) { cin >> len; if (len == 0.00) break; total = 0; for (int j = 1; total < len; j ++) total += 1.0000 / (j + 1); cout << j -1 << " card(s)" << endl; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator