結果

問題 No.1224 I hate Sqrt Inequality
コンテスト
ユーザー 双六
提出日時 2020-09-12 23:19:55
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 27 ms / 2,000 ms
+ 610µs
コード長 566 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 71 ms
コンパイル使用メモリ 82,084 KB
実行使用メモリ 57,520 KB
最終ジャッジ日時 2026-10-12 05:42:47
合計ジャッジ時間 1,609 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
mod = 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 gcd

def main():
	a, b = getlist()
	GCD = gcd(a, b)
	b = int(b // GCD)
	while True:
		if b % 2 == 0:
			b = int(b // 2)
		else:
			break

	while True:
		if b % 5 == 0:
			b = int(b // 5)
		else:
			break

	if b != 1:
		print("Yes")
	else:
		print("No")



if __name__ == '__main__':
	main()
0