結果
問題 |
No.2954 Calculation of Exponentiation
|
ユーザー |
![]() |
提出日時 | 2024-11-09 03:08:59 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 394 bytes |
コンパイル時間 | 277 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-09 03:09:36 |
合計ジャッジ時間 | 2,624 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 28 |
ソースコード
def Factorize(N): assert N>=1 factors=defaultdict(int) for p in range(2,N): if p**2>N: break while N%p==0: factors[p]+=1 N//=p if N!=1: factors[N]+=1 return factors A=round(float(input())*10000) B=round(float(input())*10000) ans="Yes" for p,e in Factorize(A).items(): if 4*B%10000: ans="No" print(ans)