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

为什么Answer Wrong

Posted by JosephJoe at 2007-12-13 16:49:55 on Problem 1218
#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:
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