結果
問題 |
No.2954 Calculation of Exponentiation
|
ユーザー |
|
提出日時 | 2024-11-08 21:47:31 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 319 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 65,152 KB |
最終ジャッジ日時 | 2024-11-08 21:47:36 |
合計ジャッジ時間 | 2,720 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 RE * 1 |
other | AC * 15 RE * 13 |
ソースコード
A,B=input().split() x=int(A[:-5]+A[-4:]) y=10000 z=int(B[:-5]+B[-4:]) w=10000 if z<0: x,y=y,x z=-z if x%y!=0: assert False print("No") exit() ans="No" A=x//y if A==1: print("Yes") exit() for i in range(2,200000): x=0 a=A while a%i==0: a//=i x+=1 if a!=1: continue if (x*z)%w==0: ans="Yes" print(ans)