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

咋就WA了-_____________________________________________________________________________- 各位大牛们help me~

Posted by majia5 at 2008-07-26 18:28:17 on Problem 3175
枚举,endless WA......
大牛help me~



#include<iostream>
using namespace std;
int main()
{
	int n,i;
	double c;
	__int64 k;
	cin>>n;
	cin>>c;
	while(c>=1)
		c/=10.0;
	while(1)
		{
			c=c+1;
			k=c*c;
			k++;
			if(c*c-(double)k<0&&c*c-(double)k>-1e-4)
				{
					cout<<k<<endl;
					break;
				}
		}
}

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