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 |
求助~~~~为什么老是超时啊!!#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator