結果

問題 No.1250 汝は倍数なりや?
ユーザー 👑 KazunKazun
提出日時 2020-08-04 20:45:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 185 ms / 1,000 ms
コード長 235 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 101,624 KB
最終ジャッジ日時 2023-08-05 09:09:36
合計ジャッジ時間 7,555 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
71,172 KB
testcase_01 AC 81 ms
70,944 KB
testcase_02 AC 82 ms
71,164 KB
testcase_03 AC 81 ms
70,936 KB
testcase_04 AC 79 ms
71,084 KB
testcase_05 AC 76 ms
70,932 KB
testcase_06 AC 75 ms
71,040 KB
testcase_07 AC 77 ms
71,236 KB
testcase_08 AC 75 ms
71,164 KB
testcase_09 AC 74 ms
71,084 KB
testcase_10 AC 75 ms
71,236 KB
testcase_11 AC 75 ms
71,024 KB
testcase_12 AC 78 ms
71,192 KB
testcase_13 AC 78 ms
71,172 KB
testcase_14 AC 74 ms
71,244 KB
testcase_15 AC 74 ms
71,284 KB
testcase_16 AC 74 ms
71,404 KB
testcase_17 AC 73 ms
71,116 KB
testcase_18 AC 78 ms
71,164 KB
testcase_19 AC 76 ms
71,364 KB
testcase_20 AC 76 ms
71,080 KB
testcase_21 AC 74 ms
71,168 KB
testcase_22 AC 78 ms
71,172 KB
testcase_23 AC 77 ms
71,068 KB
testcase_24 AC 73 ms
71,480 KB
testcase_25 AC 78 ms
71,324 KB
testcase_26 AC 75 ms
71,240 KB
testcase_27 AC 76 ms
70,932 KB
testcase_28 AC 78 ms
71,324 KB
testcase_29 AC 78 ms
71,472 KB
testcase_30 AC 77 ms
71,332 KB
testcase_31 AC 78 ms
71,088 KB
testcase_32 AC 78 ms
71,220 KB
testcase_33 AC 183 ms
99,852 KB
testcase_34 AC 127 ms
91,012 KB
testcase_35 AC 160 ms
101,624 KB
testcase_36 AC 185 ms
99,368 KB
testcase_37 AC 142 ms
91,556 KB
testcase_38 AC 151 ms
93,764 KB
testcase_39 AC 129 ms
91,456 KB
testcase_40 AC 128 ms
91,332 KB
testcase_41 AC 149 ms
96,056 KB
testcase_42 AC 116 ms
85,988 KB
testcase_43 AC 172 ms
99,324 KB
testcase_44 AC 117 ms
86,284 KB
testcase_45 AC 170 ms
99,656 KB
testcase_46 AC 106 ms
82,576 KB
testcase_47 AC 130 ms
93,444 KB
testcase_48 AC 77 ms
71,292 KB
testcase_49 AC 76 ms
71,156 KB
testcase_50 AC 75 ms
71,248 KB
testcase_51 AC 79 ms
71,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from math import gcd

N,H=map(int,input().split())
A=list(map(int,input().split()))

if 0 in A:
    print("YES")
    sys.exit()
    
for a in A:
    G=gcd(a,H)
    H//=G

if H==1:
    print("YES")
else:
    print("NO")
    
0