結果

問題 No.2954 Calculation of Exponentiation
ユーザー navel_tos
提出日時 2025-01-11 12:05:03
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 459 bytes
コンパイル時間 2,962 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 82,944 KB
最終ジャッジ日時 2025-01-11 12:05:33
合計ジャッジ時間 19,294 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other AC * 22 WA * 4 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#yukicoder2954 Calculation of Exponentiation

#入力受取
A, B = input().split()

from decimal import Decimal, getcontext
def brute(A, B):
    getcontext().prec = 3000
    C = Decimal(A) ** Decimal(B)
    return round(C, 2000) == round(C)  #ノックダウンあり
    
def solve(A, B):
    #1. A, Bを A / 10000 の形に変更
    convert = lambda S: int( S.replace( '.', '' ) )
    C, D = convert(A), convert(B)

print( 'Yes' if brute(A, B) else 'No' )
0