結果
問題 | No.1224 I hate Sqrt Inequality |
ユーザー |
![]() |
提出日時 | 2021-01-06 09:08:47 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 120 ms / 2,000 ms |
コード長 | 554 bytes |
コンパイル時間 | 921 ms |
コンパイル使用メモリ | 82,424 KB |
実行使用メモリ | 60,848 KB |
最終ジャッジ日時 | 2024-07-21 20:44:06 |
合計ジャッジ時間 | 2,385 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
import collectionsdef prime_factorize(n):a = []while n % 2 == 0:a.append(2)n //= 2f = 3while f * f <= n:if n % f == 0:a.append(f)n //= felse:f += 2if n != 1:a.append(n)return aA,B = map(int,input().split())AC = collections.Counter(prime_factorize(A))BC = collections.Counter(prime_factorize(B))P = BC-ACflag = Falsefor i in P.keys():if not (i==2 or i==5):flag = Trueif flag:print('Yes')else:print('No')