結果
| 問題 | No.1218 Something Like a Theorem |
| コンテスト | |
| ユーザー |
nohakai3
|
| 提出日時 | 2022-11-18 09:26:44 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 85,468 KB |
| 実行使用メモリ | 81,244 KB |
| 最終ジャッジ日時 | 2026-04-08 05:36:24 |
| 合計ジャッジ時間 | 8,308 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 16 |
ソースコード
n,z=map(int,input().split())
c=z**n
if n==1:
if z==1:
print("NO")
else:
print("YES")
else:
for i in range(1,1001):
for j in range(1,1001):
if i**n+j**n==c:
print("YES")
exit()
print("NO")
nohakai3