結果
| 問題 | No.1218 Something Like a Theorem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-30 23:49:52 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 2,000 ms |
| コード長 | 255 bytes |
| 記録 | |
| コンパイル時間 | 273 ms |
| コンパイル使用メモリ | 85,104 KB |
| 実行使用メモリ | 147,076 KB |
| 最終ジャッジ日時 | 2026-04-02 13:59:20 |
| 合計ジャッジ時間 | 3,068 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")