結果
問題 | No.1224 I hate Sqrt Inequality |
ユーザー |
![]() |
提出日時 | 2020-09-12 23:19:55 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 46 ms / 2,000 ms |
コード長 | 566 bytes |
コンパイル時間 | 194 ms |
コンパイル使用メモリ | 82,428 KB |
実行使用メモリ | 54,400 KB |
最終ジャッジ日時 | 2024-06-11 21:23:33 |
合計ジャッジ時間 | 1,595 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
import sys; input = sys.stdin.buffer.readlinesys.setrecursionlimit(10**7)from collections import defaultdictmod = 10 ** 9 + 7; INF = float("inf")def getlist():return list(map(int, input().split()))def inverse(N, mod):return (pow(N, mod - 2, mod))from math import gcddef main():a, b = getlist()GCD = gcd(a, b)b = int(b // GCD)while True:if b % 2 == 0:b = int(b // 2)else:breakwhile True:if b % 5 == 0:b = int(b // 5)else:breakif b != 1:print("Yes")else:print("No")if __name__ == '__main__':main()