結果

問題 No.800 四平方定理
ユーザー tailstails
提出日時 2020-09-03 18:03:55
言語 Perl
(5.38.2)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 163 bytes
コンパイル時間 548 ms
コンパイル使用メモリ 5,888 KB
実行使用メモリ 97,152 KB
最終ジャッジ日時 2024-05-03 00:35:49
合計ジャッジ時間 28,286 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,040 KB
testcase_01 AC 25 ms
7,936 KB
testcase_02 AC 20 ms
7,296 KB
testcase_03 AC 21 ms
7,424 KB
testcase_04 AC 20 ms
7,296 KB
testcase_05 AC 23 ms
7,424 KB
testcase_06 AC 28 ms
8,448 KB
testcase_07 AC 29 ms
7,552 KB
testcase_08 AC 35 ms
8,448 KB
testcase_09 AC 25 ms
8,064 KB
testcase_10 AC 998 ms
56,704 KB
testcase_11 AC 1,021 ms
58,240 KB
testcase_12 AC 1,054 ms
58,112 KB
testcase_13 AC 901 ms
57,344 KB
testcase_14 AC 932 ms
58,496 KB
testcase_15 AC 1,086 ms
58,240 KB
testcase_16 AC 921 ms
58,496 KB
testcase_17 AC 966 ms
58,496 KB
testcase_18 AC 1,157 ms
58,368 KB
testcase_19 AC 1,147 ms
58,368 KB
testcase_20 AC 8 ms
5,888 KB
testcase_21 AC 8 ms
6,144 KB
testcase_22 AC 1,210 ms
58,496 KB
testcase_23 TLE -
testcase_24 AC 1,705 ms
97,080 KB
testcase_25 TLE -
testcase_26 AC 7 ms
6,016 KB
testcase_27 AC 7 ms
6,144 KB
testcase_28 AC 1,725 ms
97,024 KB
testcase_29 AC 1,859 ms
97,152 KB
testcase_30 AC 1,778 ms
97,024 KB
testcase_31 AC 1,575 ms
95,104 KB
testcase_32 AC 1,866 ms
97,152 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($n,$d)=glob<>;
for$x(1..$n){
	for$y(1..$n){
		++$a[$x*$x+$y*$y];
	}
}
for$w(1..$n){
	for$z(1..$n){
		$e=$w*$w-$z*$z+$d;
		last if $e<0;
		$r+=$a[$e];
	}
}
print$r
0