| ||||||||||
| 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:为什么Answer WrongIn 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator