結果

問題 No.1218 Something Like a Theorem
ユーザー tailstails
提出日時 2020-09-04 21:36:35
言語 Perl
(5.38.2)
結果
AC  
実行時間 272 ms / 2,000 ms
コード長 143 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 5,392 KB
実行使用メモリ 30,244 KB
最終ジャッジ日時 2023-08-17 15:08:49
合計ジャッジ時間 3,538 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 272 ms
30,040 KB
testcase_01 AC 6 ms
5,068 KB
testcase_02 AC 6 ms
5,180 KB
testcase_03 AC 6 ms
5,220 KB
testcase_04 AC 6 ms
5,144 KB
testcase_05 AC 6 ms
5,140 KB
testcase_06 AC 271 ms
29,988 KB
testcase_07 AC 258 ms
30,064 KB
testcase_08 AC 261 ms
29,944 KB
testcase_09 AC 264 ms
30,036 KB
testcase_10 AC 264 ms
30,120 KB
testcase_11 AC 263 ms
29,996 KB
testcase_12 AC 258 ms
30,244 KB
testcase_13 AC 6 ms
5,204 KB
testcase_14 AC 6 ms
5,208 KB
testcase_15 AC 6 ms
5,088 KB
testcase_16 AC 6 ms
5,272 KB
testcase_17 AC 6 ms
5,180 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::r" used only once: possible typo at Main.pl line 3.
Main.pl syntax OK

ソースコード

diff #

($n,$z)=glob<>;
print $n>2?No:$n<2?$z>1?Yes:No:do{
	$r=No;
	for$x(1..1000){
		for$y(1..1000){
			$d[$x*$x+$y*$y]=1;
		}
	}
	$d[$z*$z]?Yes:No
}
0