結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー ibukitiibukiti
提出日時 2021-10-29 22:30:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 554 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-16 15:20:10
合計ジャッジ時間 8,129 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,752 KB
testcase_01 AC 31 ms
10,880 KB
testcase_02 AC 33 ms
10,752 KB
testcase_03 AC 127 ms
10,880 KB
testcase_04 AC 215 ms
10,880 KB
testcase_05 AC 152 ms
10,880 KB
testcase_06 AC 163 ms
10,880 KB
testcase_07 WA -
testcase_08 AC 240 ms
10,752 KB
testcase_09 AC 147 ms
10,752 KB
testcase_10 WA -
testcase_11 AC 152 ms
10,752 KB
testcase_12 WA -
testcase_13 AC 192 ms
10,880 KB
testcase_14 WA -
testcase_15 AC 174 ms
10,752 KB
testcase_16 AC 199 ms
10,880 KB
testcase_17 WA -
testcase_18 AC 200 ms
10,752 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 165 ms
10,880 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 122 ms
10,752 KB
testcase_25 AC 225 ms
10,752 KB
testcase_26 WA -
testcase_27 AC 178 ms
10,752 KB
testcase_28 AC 185 ms
10,752 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 182 ms
10,880 KB
testcase_32 WA -
testcase_33 AC 162 ms
10,880 KB
testcase_34 AC 162 ms
10,752 KB
testcase_35 WA -
testcase_36 AC 242 ms
10,880 KB
testcase_37 WA -
testcase_38 AC 31 ms
10,752 KB
testcase_39 AC 31 ms
10,752 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 32 ms
10,752 KB
testcase_43 AC 31 ms
10,752 KB
testcase_44 WA -
testcase_45 AC 97 ms
10,752 KB
testcase_46 AC 114 ms
10,880 KB
testcase_47 WA -
testcase_48 AC 30 ms
10,752 KB
testcase_49 AC 67 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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())
xlis=factorization(x)
ylis=factorization(y)
for i in xlis:
    for j in ylis:
        if i[0]==j[0]:
            print("Yes")
            exit()
print("No")            
0