結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
74,496 KB
testcase_01 AC 88 ms
73,600 KB
testcase_02 AC 87 ms
74,368 KB
testcase_03 AC 83 ms
73,600 KB
testcase_04 AC 84 ms
73,088 KB
testcase_05 AC 85 ms
73,216 KB
testcase_06 AC 82 ms
73,472 KB
testcase_07 AC 84 ms
73,472 KB
testcase_08 AC 86 ms
74,240 KB
testcase_09 WA -
testcase_10 AC 85 ms
73,472 KB
testcase_11 AC 87 ms
74,368 KB
testcase_12 AC 88 ms
74,624 KB
testcase_13 WA -
testcase_14 AC 88 ms
74,112 KB
testcase_15 AC 86 ms
73,856 KB
testcase_16 AC 87 ms
74,368 KB
testcase_17 AC 87 ms
74,112 KB
testcase_18 WA -
testcase_19 AC 87 ms
73,472 KB
testcase_20 WA -
testcase_21 AC 88 ms
74,368 KB
testcase_22 AC 88 ms
74,880 KB
testcase_23 AC 87 ms
74,240 KB
testcase_24 WA -
testcase_25 AC 87 ms
74,496 KB
testcase_26 AC 86 ms
73,472 KB
testcase_27 AC 87 ms
73,984 KB
testcase_28 WA -
testcase_29 AC 87 ms
73,344 KB
testcase_30 AC 91 ms
74,112 KB
testcase_31 WA -
testcase_32 AC 88 ms
74,368 KB
testcase_33 AC 86 ms
74,112 KB
testcase_34 AC 89 ms
74,496 KB
testcase_35 WA -
testcase_36 AC 87 ms
73,856 KB
testcase_37 AC 92 ms
73,984 KB
testcase_38 AC 88 ms
74,112 KB
testcase_39 AC 92 ms
73,856 KB
testcase_40 AC 83 ms
73,472 KB
testcase_41 WA -
testcase_42 AC 88 ms
74,240 KB
testcase_43 AC 89 ms
74,112 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 89 ms
74,112 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 X != Y:
    print('No')
elif X == 1:
    print('Yes')
else:
    if A < B:
        print('No')
    else:
        print('Yes')
0