結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー roarisroaris
提出日時 2021-10-29 21:43:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 59,520 KB
最終ジャッジ日時 2024-04-16 14:28:55
合計ジャッジ時間 4,475 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
53,888 KB
testcase_01 AC 42 ms
54,016 KB
testcase_02 AC 45 ms
53,888 KB
testcase_03 AC 61 ms
58,880 KB
testcase_04 AC 70 ms
59,392 KB
testcase_05 AC 64 ms
59,520 KB
testcase_06 AC 65 ms
59,520 KB
testcase_07 AC 69 ms
59,008 KB
testcase_08 AC 71 ms
59,520 KB
testcase_09 AC 63 ms
59,392 KB
testcase_10 AC 65 ms
58,752 KB
testcase_11 AC 63 ms
59,392 KB
testcase_12 AC 69 ms
59,392 KB
testcase_13 AC 69 ms
59,136 KB
testcase_14 AC 50 ms
59,392 KB
testcase_15 AC 62 ms
58,880 KB
testcase_16 AC 67 ms
58,752 KB
testcase_17 AC 64 ms
59,008 KB
testcase_18 AC 66 ms
59,008 KB
testcase_19 AC 60 ms
58,880 KB
testcase_20 AC 59 ms
59,392 KB
testcase_21 AC 60 ms
59,520 KB
testcase_22 AC 62 ms
59,392 KB
testcase_23 AC 69 ms
59,392 KB
testcase_24 AC 59 ms
58,752 KB
testcase_25 AC 67 ms
58,752 KB
testcase_26 AC 64 ms
59,008 KB
testcase_27 AC 67 ms
58,880 KB
testcase_28 AC 63 ms
58,752 KB
testcase_29 AC 68 ms
59,392 KB
testcase_30 AC 68 ms
59,272 KB
testcase_31 AC 64 ms
58,880 KB
testcase_32 AC 69 ms
59,520 KB
testcase_33 AC 71 ms
58,880 KB
testcase_34 AC 71 ms
58,880 KB
testcase_35 AC 71 ms
58,880 KB
testcase_36 AC 70 ms
59,136 KB
testcase_37 AC 42 ms
53,888 KB
testcase_38 AC 42 ms
53,376 KB
testcase_39 AC 42 ms
53,888 KB
testcase_40 AC 57 ms
58,880 KB
testcase_41 AC 40 ms
54,016 KB
testcase_42 AC 41 ms
53,888 KB
testcase_43 AC 41 ms
53,632 KB
testcase_44 AC 43 ms
53,376 KB
testcase_45 AC 58 ms
59,264 KB
testcase_46 AC 61 ms
59,392 KB
testcase_47 AC 64 ms
59,392 KB
testcase_48 AC 45 ms
59,520 KB
testcase_49 AC 51 ms
59,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

def factorize(n):
    fct = defaultdict(int)
    
    for i in range(2, int(n**0.5)+1):
        c = 0
        
        while n%i==0:
            n //= i
            c += 1
            
        if c>0:
            fct[i] = c
    
    if n>1:
        fct[n] = 1
    
    return fct

X, A, Y, B = map(int, input().split())
fctX = factorize(X)
fctY = factorize(Y)
ok = True

for k in fctY:
    if fctX[k]*A<fctY[k]*B:
        ok = False

if ok:
    print('Yes')
else:
    print('No')
0