結果
| 問題 | No.1218 Something Like a Theorem |
| コンテスト | |
| ユーザー |
nohakai3
|
| 提出日時 | 2022-11-18 09:26:44 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 600 ms |
| コンパイル使用メモリ | 96,076 KB |
| 実行使用メモリ | 84,632 KB |
| 最終ジャッジ日時 | 2026-08-31 06:08:16 |
| 合計ジャッジ時間 | 7,752 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_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