結果
| 問題 | No.1218 Something Like a Theorem |
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2024-09-05 23:09:20 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 70 ms / 2,000 ms |
| + 116µs | |
| コード長 | 196 bytes |
| 記録 | |
| コンパイル時間 | 279 ms |
| コンパイル使用メモリ | 96,112 KB |
| 実行使用メモリ | 84,088 KB |
| 最終ジャッジ日時 | 2026-08-25 11:41:48 |
| 合計ジャッジ時間 | 2,977 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 |
ソースコード
n,z=map(int,input().split())
if n==1:
print(["No","Yes"][z>=2])
elif n==2:
f=0
for x in range(1,1001):
for y in range(1,1001):
f|=x**n+y**n==z**n
print(["No","Yes"][f])
else:
print("No")
sasa8uyauya