結果

問題 No.1218 Something Like a Theorem
ユーザー tailstails
提出日時 2020-09-04 21:28:05
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 138 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 6,016 KB
実行使用メモリ 6,144 KB
最終ジャッジ日時 2024-05-04 21:32:56
合計ジャッジ時間 1,558 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
6,016 KB
testcase_01 AC 6 ms
6,016 KB
testcase_02 WA -
testcase_03 AC 7 ms
6,016 KB
testcase_04 AC 7 ms
6,016 KB
testcase_05 AC 6 ms
6,016 KB
testcase_06 AC 77 ms
6,016 KB
testcase_07 AC 80 ms
6,016 KB
testcase_08 AC 80 ms
6,016 KB
testcase_09 AC 81 ms
6,016 KB
testcase_10 AC 78 ms
6,016 KB
testcase_11 WA -
testcase_12 AC 80 ms
6,144 KB
testcase_13 AC 7 ms
6,016 KB
testcase_14 AC 6 ms
6,016 KB
testcase_15 AC 7 ms
6,016 KB
testcase_16 AC 7 ms
6,016 KB
testcase_17 AC 7 ms
6,016 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "r" may clash with future reserved word at Main.pl line 11.
Main.pl syntax OK

ソースコード

diff #

($n,$z)=glob<>;
print $n>2?No:$n<2?Yes:${
	$r=No;
	for$i(1..1e6){
		$w=$z-$i*$i;
		if($w>0&&$w==int(sqrt($w))**2){
			$r=Yes;
		}
	}
	r
}
0