結果
| 問題 | 
                            No.1593 Perfect Distance
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-12-27 19:29:39 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 246 bytes | 
| コンパイル時間 | 265 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 20,992 KB | 
| 最終ジャッジ日時 | 2024-11-22 05:38:03 | 
| 合計ジャッジ時間 | 25,852 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 9 TLE * 8 | 
ソースコード
n = int(input())
nn = n ** 2
c = 0
for x in range(1,n):
    for y in range(n,1,-1):
        s = x ** 2 + y ** 2
        if s == nn:
       #     print(str(x) + ":" + str(y))
            c = c + 1
        elif s < nn:
            break
print(c)