結果
| 問題 | No.1218 Something Like a Theorem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-30 23:49:52 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 2,000 ms |
| コード長 | 255 bytes |
| 記録 | |
| コンパイル時間 | 486 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 60,288 KB |
| 最終ジャッジ日時 | 2024-07-19 03:59:02 |
| 合計ジャッジ時間 | 1,630 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 |
ソースコード
N,Z=map(int,input().split())
if N==1 and 2<=Z:
print("Yes")
exit()
for x in range(1,1001):
for y in range(1,1001):
if x**N+y**N==Z**N:
print("Yes")
exit()
if x**N+y**N>Z**N:
break
print("No")