結果

問題 No.1218 Something Like a Theorem
ユーザー もりをもりを
提出日時 2020-09-04 21:23:34
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 372 ms / 2,000 ms
コード長 274 bytes
コンパイル時間 571 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 76,912 KB
最終ジャッジ日時 2023-08-17 14:45:56
合計ジャッジ時間 1,592 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,192 KB
testcase_01 AC 16 ms
7,908 KB
testcase_02 AC 16 ms
7,960 KB
testcase_03 AC 15 ms
8,116 KB
testcase_04 AC 15 ms
8,120 KB
testcase_05 AC 372 ms
76,912 KB
testcase_06 AC 16 ms
7,784 KB
testcase_07 AC 15 ms
8,244 KB
testcase_08 AC 15 ms
8,144 KB
testcase_09 AC 16 ms
7,960 KB
testcase_10 AC 16 ms
8,232 KB
testcase_11 AC 16 ms
7,940 KB
testcase_12 AC 15 ms
8,184 KB
testcase_13 AC 16 ms
7,960 KB
testcase_14 AC 15 ms
7,788 KB
testcase_15 AC 15 ms
7,800 KB
testcase_16 AC 15 ms
7,860 KB
testcase_17 AC 14 ms
7,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# URL : https://yukicoder.me/problems/no/1218
n, z = map(int, input().split())
zn = z ** n
st = set()
tmp = 1
while 1:
    if tmp ** n > zn:
        break
    st.add(tmp ** n)
    tmp += 1
for i in st:
    if (zn - i) in st:
        print('Yes')
        exit(0)
print('No')
0