結果

問題 No.1224 I hate Sqrt Inequality
ユーザー ygd.ygd.
提出日時 2020-09-11 22:04:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 329 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 58,880 KB
最終ジャッジ日時 2024-06-11 21:19:50
合計ジャッジ時間 1,577 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
a,b = map(int,input().split())
G = math.gcd(a,b)
a = a//G
b = b//G

if b == 1:
  print("No");exit()

two = [1]
for i in range(60):
  two.append(two[-1]*2)
five = [1]
for i in range(30):
  five.append(five[-1]*5)
S = set([])
for t in two:
  for f in five:
    S.add(t*f)

if b in S:
  print("No")
else:
  print("Yes")
0