Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:没有注意到那个card(s)于是在1003贡献了3次WA。。

Posted by silk29 at 2014-04-04 19:39:21 on Problem 1003
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator