結果

問題 No.800 四平方定理
ユーザー Yoichiro NishimuraYoichiro Nishimura
提出日時 2019-04-26 12:46:00
言語 PHP
(8.3.4)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 295 bytes
コンパイル時間 844 ms
コンパイル使用メモリ 11,948 KB
実行使用メモリ 92,532 KB
最終ジャッジ日時 2023-08-15 19:54:26
合計ジャッジ時間 22,254 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
12,400 KB
testcase_01 AC 36 ms
13,768 KB
testcase_02 AC 27 ms
13,708 KB
testcase_03 AC 30 ms
13,708 KB
testcase_04 AC 27 ms
13,796 KB
testcase_05 AC 29 ms
13,764 KB
testcase_06 AC 42 ms
13,776 KB
testcase_07 AC 34 ms
13,800 KB
testcase_08 AC 43 ms
13,712 KB
testcase_09 AC 35 ms
13,784 KB
testcase_10 AC 1,062 ms
51,196 KB
testcase_11 AC 1,218 ms
51,216 KB
testcase_12 AC 1,223 ms
51,252 KB
testcase_13 AC 1,158 ms
51,248 KB
testcase_14 AC 1,279 ms
51,180 KB
testcase_15 AC 1,256 ms
51,220 KB
testcase_16 AC 1,285 ms
51,220 KB
testcase_17 AC 1,254 ms
51,248 KB
testcase_18 AC 1,233 ms
51,252 KB
testcase_19 AC 1,243 ms
51,288 KB
testcase_20 AC 7 ms
12,408 KB
testcase_21 AC 7 ms
12,296 KB
testcase_22 AC 1,261 ms
51,348 KB
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 AC 8 ms
12,440 KB
testcase_27 AC 8 ms
12,344 KB
testcase_28 TLE -
testcase_29 TLE -
testcase_30 TLE -
testcase_31 TLE -
testcase_32 TLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
list($n, $d) = explode(" ", trim(fgets(STDIN)));
for($x = 1; $x <= $n; $x++){
    for($y = 1; $y <= $n; $y++){
        @$map[$x*$x + $y*$y]++;
    }
}
$count = 0;
for($z = 1; $z <= $n; $z++){
    for($w = 1; $w <= $n; $w++){
        $count+=@$map[$w*$w - $z*$z + $d];
    }
}
echo $count;
0