結果

問題 No.1250 汝は倍数なりや?
ユーザー noisy_noiminnoisy_noimin
提出日時 2020-10-09 23:02:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 230 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 28,484 KB
最終ジャッジ日時 2023-09-27 19:16:57
合計ジャッジ時間 6,484 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,756 KB
testcase_01 AC 15 ms
7,888 KB
testcase_02 AC 15 ms
7,888 KB
testcase_03 AC 14 ms
7,692 KB
testcase_04 WA -
testcase_05 AC 14 ms
7,744 KB
testcase_06 AC 13 ms
7,696 KB
testcase_07 AC 14 ms
7,828 KB
testcase_08 AC 13 ms
7,772 KB
testcase_09 AC 13 ms
7,816 KB
testcase_10 AC 14 ms
7,952 KB
testcase_11 WA -
testcase_12 AC 15 ms
7,900 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 14 ms
7,792 KB
testcase_16 WA -
testcase_17 AC 13 ms
7,768 KB
testcase_18 AC 14 ms
7,784 KB
testcase_19 AC 14 ms
7,932 KB
testcase_20 AC 13 ms
7,812 KB
testcase_21 AC 14 ms
7,772 KB
testcase_22 AC 14 ms
7,772 KB
testcase_23 AC 15 ms
7,760 KB
testcase_24 AC 15 ms
7,884 KB
testcase_25 AC 16 ms
7,852 KB
testcase_26 AC 15 ms
7,796 KB
testcase_27 AC 15 ms
7,776 KB
testcase_28 WA -
testcase_29 AC 13 ms
7,776 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 15 ms
7,780 KB
testcase_33 AC 440 ms
28,484 KB
testcase_34 AC 117 ms
18,232 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 274 ms
18,920 KB
testcase_38 AC 296 ms
20,220 KB
testcase_39 WA -
testcase_40 AC 118 ms
18,616 KB
testcase_41 AC 359 ms
21,704 KB
testcase_42 AC 181 ms
15,604 KB
testcase_43 AC 432 ms
26,792 KB
testcase_44 AC 181 ms
15,576 KB
testcase_45 AC 243 ms
26,800 KB
testcase_46 AC 143 ms
13,564 KB
testcase_47 AC 149 ms
19,668 KB
testcase_48 AC 16 ms
7,808 KB
testcase_49 AC 14 ms
7,776 KB
testcase_50 AC 14 ms
7,824 KB
testcase_51 AC 14 ms
7,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, h = map(int, input().split())
a = list(map(int, input().split()))

def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a%b)
    

for i in range(n):
    g = gcd(h, a[i])
    h /= g

print("YES" if h == 1 else "NO")
0