結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー tassei903
提出日時 2021-10-29 22:24:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 878 bytes
コンパイル時間 393 ms
コンパイル使用メモリ 82,592 KB
実行使用メモリ 59,520 KB
最終ジャッジ日時 2024-10-07 11:57:49
合計ジャッジ時間 4,947 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
sys.setrecursionlimit(10**7)
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################

def facts(n):
    res = []
    if n==1:
        return res
    for i in range(2, int(n**0.5)+4):
        if n%i==0:
            c = 0
            while n%i==0:
                c += 1
                n//=i
            res.append((i, c))
    if n!=1:
        res.append((n, 1))
    return res

x,a,y,b = na()

d1 = facts(x)
d2 = facts(y)

from collections import defaultdict

d = defaultdict(int)
for i, j in d1:
    d[i] = j

for i, j, in d2:
    if d[i]*a<j*b:
        No()
        exit()
Yes()
0