結果
問題 |
No.1224 I hate Sqrt Inequality
|
ユーザー |
![]() |
提出日時 | 2022-01-18 05:45:20 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 523 bytes |
コンパイル時間 | 262 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 57,600 KB |
最終ジャッジ日時 | 2024-11-23 13:16:22 |
合計ジャッジ時間 | 1,685 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 WA * 8 |
ソースコード
n,m= map(int,input().split()) def p(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) sa=set(a) return sa if m%n != 0: sa=p(n) if len(sa) == 2: if 2 not in sa or 5 not in sa: print('Yes') exit() else: print('Yes') exit() print('No')