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:为什么Answer Wrong

Posted by justcheat at 2007-12-13 17:26:03 on Problem 1218
In Reply To:Re:为什么Answer Wrong Posted by:JosephJoe at 2007-12-13 16:51:36
这样就过了
#include<iostream>
using namespace std;
int left(int x);
int main()
{int n,x,i;
cin>>x;
while(x--)
{
cin>>n;
cout<<left(n)<<endl;
}
 }
int left(int x)
{int i=1;
 while(i*i<x)
 i++;
 if(i*i>x)return i-1;
 else return i;
}

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