結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー ああいいああいい
提出日時 2022-05-18 09:07:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 105 ms / 2,000 ms
コード長 759 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 84,440 KB
最終ジャッジ日時 2023-10-14 15:16:30
合計ジャッジ時間 7,819 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
83,952 KB
testcase_01 AC 98 ms
84,304 KB
testcase_02 AC 97 ms
84,380 KB
testcase_03 AC 100 ms
84,300 KB
testcase_04 AC 96 ms
84,304 KB
testcase_05 AC 98 ms
84,440 KB
testcase_06 AC 105 ms
84,332 KB
testcase_07 AC 99 ms
84,292 KB
testcase_08 AC 99 ms
84,288 KB
testcase_09 AC 99 ms
84,332 KB
testcase_10 AC 97 ms
84,288 KB
testcase_11 AC 100 ms
84,244 KB
testcase_12 AC 103 ms
84,288 KB
testcase_13 AC 97 ms
84,280 KB
testcase_14 AC 97 ms
84,216 KB
testcase_15 AC 93 ms
84,064 KB
testcase_16 AC 96 ms
84,384 KB
testcase_17 AC 98 ms
84,108 KB
testcase_18 AC 104 ms
84,400 KB
testcase_19 AC 99 ms
84,144 KB
testcase_20 AC 99 ms
84,224 KB
testcase_21 AC 96 ms
84,124 KB
testcase_22 AC 100 ms
84,364 KB
testcase_23 AC 96 ms
84,296 KB
testcase_24 AC 98 ms
84,224 KB
testcase_25 AC 97 ms
84,384 KB
testcase_26 AC 99 ms
84,244 KB
testcase_27 AC 97 ms
84,052 KB
testcase_28 AC 98 ms
84,096 KB
testcase_29 AC 94 ms
84,276 KB
testcase_30 AC 96 ms
84,176 KB
testcase_31 AC 101 ms
84,016 KB
testcase_32 AC 98 ms
84,144 KB
testcase_33 AC 97 ms
84,164 KB
testcase_34 AC 96 ms
84,072 KB
testcase_35 AC 98 ms
84,292 KB
testcase_36 AC 97 ms
84,248 KB
testcase_37 AC 97 ms
84,076 KB
testcase_38 AC 97 ms
84,284 KB
testcase_39 AC 96 ms
84,404 KB
testcase_40 AC 95 ms
84,256 KB
testcase_41 AC 98 ms
84,172 KB
testcase_42 AC 99 ms
84,256 KB
testcase_43 AC 93 ms
84,140 KB
testcase_44 AC 100 ms
84,140 KB
testcase_45 AC 100 ms
84,320 KB
testcase_46 AC 96 ms
84,208 KB
testcase_47 AC 96 ms
84,408 KB
testcase_48 AC 98 ms
84,144 KB
testcase_49 AC 95 ms
84,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x,a,y,b = map(int,input().split())

dx = dict()
dy = dict()

C = 10 ** 6
dat = [0] * C
for i in range(2,C):
    if dat[i] == 0:
        for j in range(2 * i,C,i):
            dat[j] = 1
        if x % i == 0:
            x //= i
            count = 1
            while x % i == 0:
                x //= i
                count += 1
            dx[i] = count
        if y % i == 0:
            y //= i
            count = 1
            while y % i == 0:
                y //= i
                count += 1
            dy[i] = count
if x != 1:
    dx[x] = 1
if y != 1:
    dy[y] = 1
import sys
for p in dy:
    c = dy[p] * b
    if p not in dx:
        print('No')
        exit()
    cc = dx[p] * a
    if cc < c:
        print('No')
        exit()
print('Yes')
0