結果
| 問題 |
No.800 四平方定理
|
| コンテスト | |
| ユーザー |
910_sendai
|
| 提出日時 | 2019-03-18 12:24:30 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 260 bytes |
| コンパイル時間 | 103 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 21,248 KB |
| 最終ジャッジ日時 | 2024-07-18 05:59:28 |
| 合計ジャッジ時間 | 6,506 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 29 |
ソースコード
N, D = map(int, input().split())
ans = 0
for x in range(1, N + 1):
for y in range(1, N + 1):
for z in range(1, N + 1):
for w in range(1, N + 1):
if x**2 + y**2 + z**2 - w**2 == D:
ans += 1
print(ans)
910_sendai