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:没有注意到那个card(s)于是在1003贡献了3次WA。。In Reply To:没有注意到那个card(s)于是在1003贡献了3次WA。。 Posted by:Ryvius at 2013-05-15 15:52:00 #include <iostream> using namespace std; int main() { float sum = 0.0; float lenth; int card; cin >> lenth; for (card=1; sum < lenth; card++) { sum += 1.0 / (card + 1); } cout << card-1<<" "<<"card(s)" << endl; } 大神帮忙看看我这个怎么一直WA呗,谢谢了 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator