結果

問題 No.1224 I hate Sqrt Inequality
ユーザー koba-e964koba-e964
提出日時 2020-09-29 15:08:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 71,784 KB
最終ジャッジ日時 2023-09-17 00:07:18
合計ジャッジ時間 2,128 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,536 KB
testcase_01 AC 70 ms
71,596 KB
testcase_02 AC 67 ms
71,468 KB
testcase_03 AC 69 ms
71,400 KB
testcase_04 AC 67 ms
71,740 KB
testcase_05 AC 69 ms
71,372 KB
testcase_06 AC 69 ms
71,360 KB
testcase_07 AC 68 ms
71,784 KB
testcase_08 AC 68 ms
71,444 KB
testcase_09 AC 68 ms
71,256 KB
testcase_10 AC 68 ms
71,588 KB
testcase_11 AC 67 ms
71,464 KB
testcase_12 AC 68 ms
71,532 KB
testcase_13 AC 69 ms
71,544 KB
testcase_14 AC 69 ms
71,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3

import sys
import math
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)

a, b = map(int, readline().split())
g = math.gcd(a, b)
a //= g
b //= g
while True:
    x = math.gcd(b, 10)
    if x == 1:
        break
    b //= x

print('Yes' if b != 1 else 'No')
0