| ||||||||||
| 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 | |||||||||
1218是什么意思?1218是什么意思?我真不知道,只知道前辈们说是求n以内完全平方数的个数!读哪个题目真是很纠结,第一次是开所有的锁第二次是锁2,4,6……的锁,第三次是看3,6,9……的锁,是开的就锁,是锁着的就开,那么我就不明白第四次该怎么办了……我很愚钝……所以就借鉴前辈的结论,写了个水的代码
#include"stdio.h"
#include"math.h"
int main()
{
int n,m,t;
scanf("%d",&n);
while(n --)
{
scanf("%d",&m);
t=sqrt(m);
printf("%d\n",t);
}
return 0;
}
竟然过了,……我汗……
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator