結果

問題 No.1218 Something Like a Theorem
ユーザー tailstails
提出日時 2020-09-04 21:36:35
言語 Perl
(5.38.2)
結果
AC  
実行時間 268 ms / 2,000 ms
コード長 143 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 5,888 KB
実行使用メモリ 30,848 KB
最終ジャッジ日時 2024-05-04 21:48:07
合計ジャッジ時間 3,328 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 264 ms
30,684 KB
testcase_01 AC 7 ms
6,016 KB
testcase_02 AC 7 ms
5,888 KB
testcase_03 AC 7 ms
5,888 KB
testcase_04 AC 7 ms
5,888 KB
testcase_05 AC 7 ms
5,888 KB
testcase_06 AC 261 ms
30,720 KB
testcase_07 AC 262 ms
30,848 KB
testcase_08 AC 268 ms
30,764 KB
testcase_09 AC 261 ms
30,720 KB
testcase_10 AC 263 ms
30,720 KB
testcase_11 AC 263 ms
30,720 KB
testcase_12 AC 263 ms
30,720 KB
testcase_13 AC 8 ms
6,016 KB
testcase_14 AC 7 ms
5,888 KB
testcase_15 AC 8 ms
5,888 KB
testcase_16 AC 7 ms
6,016 KB
testcase_17 AC 7 ms
5,888 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