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
欢迎参加IJCAI 2020麻将智能体竞赛,大奖等你拿!Welcome to IJCAI 2020 Mahjong AI competition with amazing prizes!

1218是什么意思?

Posted by liuwencheng at 2010-11-07 13:12:58 on Problem 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:
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