結果
| 問題 |
No.1218 Something Like a Theorem
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2023-01-01 23:19:24 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 179 ms / 2,000 ms |
| コード長 | 187 bytes |
| コンパイル時間 | 364 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 224,384 KB |
| 最終ジャッジ日時 | 2024-11-27 00:25:42 |
| 合計ジャッジ時間 | 1,792 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 |
ソースコード
n, z = map(int, input().split())
Z = z ** n
S = set()
i = 1
while i ** n <= Z:
S.add(i ** n)
i += 1
for s in S:
if Z - s in S:
print("Yes")
exit()
print("No")
rlangevin