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

求助~~~~为什么老是超时啊!!

Posted by hmilyxuy at 2008-05-30 22:15:33 on Problem 1218
#include<iostream>
#include<math.h>
using namespace std;
const int MAX=100;
int main()
{
	int N;
	float a[MAX]; //用float是因为int编译器会说sqrt函数有二义性导致编译错误
	cin>>N;
	for(int i=0;i<N;i++)
		cin>>a[i];

	for(int j=0;j<N;j++)
	{
		cout<<int(sqrt(a[j]))<<endl;
	}
	return 0;
}

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