結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー minimumminimum
提出日時 2021-10-29 21:43:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 655 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 74,624 KB
最終ジャッジ日時 2024-04-16 14:28:25
合計ジャッジ時間 6,869 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
74,240 KB
testcase_01 AC 97 ms
73,344 KB
testcase_02 AC 103 ms
73,856 KB
testcase_03 AC 100 ms
73,088 KB
testcase_04 AC 101 ms
73,088 KB
testcase_05 AC 101 ms
73,344 KB
testcase_06 AC 102 ms
73,344 KB
testcase_07 AC 103 ms
73,344 KB
testcase_08 AC 108 ms
73,984 KB
testcase_09 WA -
testcase_10 AC 101 ms
73,472 KB
testcase_11 AC 108 ms
73,984 KB
testcase_12 AC 113 ms
74,496 KB
testcase_13 WA -
testcase_14 AC 106 ms
73,984 KB
testcase_15 AC 107 ms
73,728 KB
testcase_16 AC 109 ms
73,856 KB
testcase_17 AC 106 ms
74,112 KB
testcase_18 WA -
testcase_19 AC 96 ms
73,216 KB
testcase_20 WA -
testcase_21 AC 105 ms
74,240 KB
testcase_22 AC 108 ms
74,624 KB
testcase_23 AC 104 ms
74,240 KB
testcase_24 WA -
testcase_25 AC 105 ms
74,240 KB
testcase_26 AC 99 ms
73,216 KB
testcase_27 AC 107 ms
73,984 KB
testcase_28 WA -
testcase_29 AC 99 ms
73,472 KB
testcase_30 AC 103 ms
73,984 KB
testcase_31 WA -
testcase_32 AC 107 ms
74,112 KB
testcase_33 AC 107 ms
73,856 KB
testcase_34 AC 103 ms
73,984 KB
testcase_35 WA -
testcase_36 AC 104 ms
73,856 KB
testcase_37 AC 110 ms
74,112 KB
testcase_38 AC 105 ms
73,984 KB
testcase_39 AC 109 ms
73,984 KB
testcase_40 AC 100 ms
73,216 KB
testcase_41 WA -
testcase_42 AC 107 ms
74,112 KB
testcase_43 AC 112 ms
74,368 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 107 ms
73,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

X, A, Y, B = map(int, input().split())

mx = 10 ** 6
isprime = [True] * (mx + 1)
prime_list = []
isprime[0], isprime[1] = False, False
for i in range(2, mx):
    if isprime[i] == False:
        continue
    prime_list.append(i)
    j = 2 * i
    while j <= mx:
        isprime[j] = False
        j += i

for p in prime_list:
    cnta, cntb = 0, 0
    while X % p == 0:
        X //= p
        cnta += 1
    while Y % p == 0:
        Y //= p
        cntb += 1
    if cnta * X < cntb * Y:
        print('No')
        exit()

if Y == 1:
    print('Yes')
elif X != Y:
    print('No')
else:
    if A < B:
        print('No')
    else:
        print('Yes')
    
0