結果

問題 No.1593 Perfect Distance
ユーザー 8989
提出日時 2022-02-12 01:57:18
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 244 bytes
コンパイル時間 1,502 ms
コンパイル使用メモリ 86,704 KB
実行使用メモリ 80,304 KB
最終ジャッジ日時 2023-09-10 09:49:41
合計ジャッジ時間 8,808 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
75,676 KB
testcase_01 AC 71 ms
71,172 KB
testcase_02 AC 71 ms
70,920 KB
testcase_03 AC 74 ms
71,184 KB
testcase_04 AC 71 ms
71,100 KB
testcase_05 AC 74 ms
71,000 KB
testcase_06 AC 80 ms
75,664 KB
testcase_07 AC 80 ms
75,824 KB
testcase_08 AC 85 ms
76,056 KB
testcase_09 AC 295 ms
76,112 KB
testcase_10 TLE -
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
p = 0
for i in range(1,n + 1):
    if i**2 > n**2:
        break
    for j in range(1,n + 1):
        if i**2 + j**2 > n**2:
            break
        if i** 2 + j**2 == n**2:
            p += 1
            #print(i,j)
print(p)
0