結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー playerplayer
提出日時 2024-01-15 03:01:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 763 bytes
コンパイル時間 3,902 ms
コンパイル使用メモリ 81,444 KB
実行使用メモリ 59,316 KB
最終ジャッジ日時 2024-01-15 03:02:07
合計ジャッジ時間 5,529 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
55,732 KB
testcase_01 AC 40 ms
55,860 KB
testcase_02 AC 42 ms
55,860 KB
testcase_03 AC 60 ms
59,316 KB
testcase_04 AC 66 ms
59,316 KB
testcase_05 AC 61 ms
59,316 KB
testcase_06 AC 63 ms
59,316 KB
testcase_07 AC 61 ms
59,316 KB
testcase_08 AC 69 ms
59,316 KB
testcase_09 WA -
testcase_10 AC 64 ms
59,316 KB
testcase_11 AC 80 ms
59,316 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 61 ms
59,316 KB
testcase_16 AC 63 ms
59,316 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 60 ms
59,316 KB
testcase_20 WA -
testcase_21 AC 60 ms
59,316 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 67 ms
59,316 KB
testcase_26 AC 63 ms
59,316 KB
testcase_27 AC 67 ms
59,316 KB
testcase_28 WA -
testcase_29 AC 64 ms
59,316 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 64 ms
59,316 KB
testcase_33 AC 70 ms
59,316 KB
testcase_34 AC 72 ms
59,316 KB
testcase_35 WA -
testcase_36 AC 70 ms
59,316 KB
testcase_37 WA -
testcase_38 AC 44 ms
55,604 KB
testcase_39 AC 41 ms
55,604 KB
testcase_40 AC 57 ms
59,316 KB
testcase_41 WA -
testcase_42 AC 40 ms
55,860 KB
testcase_43 AC 41 ms
55,860 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 49 ms
59,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


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

if x == 1:
    print("Yes")
    exit()
    
if y == 1:
    print("No")
    exit()

xl, yl = factorization(x), factorization(y)

dx,dy = defaultdict(int),defaultdict(int)

for li in xl:
    num,j = li
    dx[num] = j

for li in yl:
    num,j = li
    if dx[num] < j:
        print("No")
        exit()
        
print("Yes")
0