結果

問題 No.2954 Calculation of Exponentiation
ユーザー detteiuu
提出日時 2024-11-08 22:29:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 372 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-11-08 22:29:45
合計ジャッジ時間 2,670 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B = input().split()

if A[-4:] != "0000":
    exit(print("No"))

a, _ = A.split(".")
a = abs(int(a))
if a == 1:
    exit(print("Yes"))

if B[0] == "-":
    exit(print("No"))
_, b = B.split(".")
b = int(b)
if b == 0:
    exit(print("Yes"))
if 10000%b != 0:
    print("No")
else:
    n = 10000//b
    if a**(1/n)%1 == 0:
        print("Yes")
    else:
        print("No")
0