| ||||||||||
| 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 | |||||||||
为什么Answer Wrong#include<iostream>
using namespace std;
#define N 100
int left(int x);
int main()
{int n[N],x,i;
cin>>x;
for(i=1;i<=x;i++)
cin>>n[i];
for(i=1;i<=x;i++)
cout<<left(n[i])<<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