結果

問題 No.1250 汝は倍数なりや?
ユーザー gorugo30gorugo30
提出日時 2021-02-25 17:36:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 244 ms / 1,000 ms
コード長 276 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 107,208 KB
最終ジャッジ日時 2024-04-08 15:23:43
合計ジャッジ時間 6,121 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 37 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 39 ms
53,460 KB
testcase_04 AC 36 ms
53,460 KB
testcase_05 AC 37 ms
53,460 KB
testcase_06 AC 36 ms
53,460 KB
testcase_07 AC 37 ms
53,460 KB
testcase_08 AC 36 ms
53,460 KB
testcase_09 AC 37 ms
53,460 KB
testcase_10 AC 36 ms
53,460 KB
testcase_11 AC 37 ms
53,460 KB
testcase_12 AC 36 ms
53,460 KB
testcase_13 AC 37 ms
53,460 KB
testcase_14 AC 37 ms
53,460 KB
testcase_15 AC 37 ms
53,460 KB
testcase_16 AC 37 ms
53,460 KB
testcase_17 AC 37 ms
53,460 KB
testcase_18 AC 37 ms
53,460 KB
testcase_19 AC 38 ms
53,460 KB
testcase_20 AC 37 ms
53,460 KB
testcase_21 AC 36 ms
53,460 KB
testcase_22 AC 37 ms
53,460 KB
testcase_23 AC 48 ms
61,580 KB
testcase_24 AC 47 ms
61,584 KB
testcase_25 AC 56 ms
65,556 KB
testcase_26 AC 37 ms
53,460 KB
testcase_27 AC 53 ms
63,508 KB
testcase_28 AC 37 ms
53,460 KB
testcase_29 AC 43 ms
59,464 KB
testcase_30 AC 43 ms
59,324 KB
testcase_31 AC 40 ms
59,336 KB
testcase_32 AC 40 ms
59,324 KB
testcase_33 AC 213 ms
107,208 KB
testcase_34 AC 103 ms
90,232 KB
testcase_35 AC 131 ms
100,760 KB
testcase_36 AC 175 ms
103,756 KB
testcase_37 AC 195 ms
90,024 KB
testcase_38 AC 212 ms
92,200 KB
testcase_39 AC 121 ms
89,752 KB
testcase_40 AC 140 ms
89,876 KB
testcase_41 AC 165 ms
94,760 KB
testcase_42 AC 117 ms
85,212 KB
testcase_43 AC 244 ms
103,672 KB
testcase_44 AC 117 ms
85,228 KB
testcase_45 AC 144 ms
103,804 KB
testcase_46 AC 130 ms
81,768 KB
testcase_47 AC 110 ms
92,352 KB
testcase_48 AC 38 ms
53,460 KB
testcase_49 AC 35 ms
53,460 KB
testcase_50 AC 36 ms
53,460 KB
testcase_51 AC 37 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)
N, H = map(int, input().split())
A = list(map(int, input().split()))
if 0 in A:
    print("YES")
    exit()
for i in range(N):
    H //= gcd(H, abs(A[i]))
if H == 1:
    print("YES")
else:
    print("NO")
0