結果

問題 No.1224 I hate Sqrt Inequality
ユーザー mesame3993mesame3993
提出日時 2021-11-18 02:05:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 765 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 71,452 KB
最終ジャッジ日時 2023-08-26 00:30:24
合計ジャッジ時間 2,828 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,220 KB
testcase_01 AC 72 ms
71,140 KB
testcase_02 AC 71 ms
70,944 KB
testcase_03 AC 72 ms
71,172 KB
testcase_04 AC 72 ms
71,272 KB
testcase_05 AC 70 ms
71,296 KB
testcase_06 AC 72 ms
71,152 KB
testcase_07 AC 70 ms
71,276 KB
testcase_08 AC 71 ms
71,164 KB
testcase_09 AC 71 ms
71,232 KB
testcase_10 AC 70 ms
71,412 KB
testcase_11 AC 72 ms
71,152 KB
testcase_12 AC 72 ms
71,272 KB
testcase_13 AC 71 ms
71,124 KB
testcase_14 AC 71 ms
71,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
  from sys import stdin
  import math
  readline=stdin.readline
  a,b = map(int, readline().split())
  b //= math.gcd(a, b)
  for i in range(100):
    if b == 1:
      print('No')
      exit()
    if b % 2 == 0:
      b //= 2
    elif b % 5 == 0:
      b //= 5
    else:
      print('Yes')
      exit()
  print('No')
main()
0