結果

問題 No.1250 汝は倍数なりや?
ユーザー mkawa2mkawa2
提出日時 2020-10-09 21:55:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 202 ms / 1,000 ms
コード長 907 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,952 KB
実行使用メモリ 23,772 KB
最終ジャッジ日時 2023-09-27 16:43:23
合計ジャッジ時間 4,368 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,608 KB
testcase_01 AC 19 ms
8,680 KB
testcase_02 AC 16 ms
8,596 KB
testcase_03 AC 17 ms
8,784 KB
testcase_04 AC 17 ms
8,564 KB
testcase_05 AC 17 ms
8,680 KB
testcase_06 AC 17 ms
8,688 KB
testcase_07 AC 17 ms
8,572 KB
testcase_08 AC 16 ms
8,640 KB
testcase_09 AC 18 ms
8,748 KB
testcase_10 AC 16 ms
8,680 KB
testcase_11 AC 16 ms
8,640 KB
testcase_12 AC 16 ms
8,680 KB
testcase_13 AC 16 ms
8,752 KB
testcase_14 AC 17 ms
8,700 KB
testcase_15 AC 16 ms
8,784 KB
testcase_16 AC 17 ms
8,600 KB
testcase_17 AC 16 ms
8,712 KB
testcase_18 AC 17 ms
8,712 KB
testcase_19 AC 17 ms
8,760 KB
testcase_20 AC 17 ms
8,620 KB
testcase_21 AC 16 ms
8,684 KB
testcase_22 AC 17 ms
8,576 KB
testcase_23 AC 17 ms
8,768 KB
testcase_24 AC 16 ms
8,620 KB
testcase_25 AC 17 ms
8,784 KB
testcase_26 AC 17 ms
8,612 KB
testcase_27 AC 17 ms
8,696 KB
testcase_28 AC 16 ms
8,668 KB
testcase_29 AC 17 ms
8,700 KB
testcase_30 AC 17 ms
8,848 KB
testcase_31 AC 18 ms
8,628 KB
testcase_32 AC 17 ms
8,824 KB
testcase_33 AC 202 ms
23,772 KB
testcase_34 AC 31 ms
16,308 KB
testcase_35 AC 47 ms
21,760 KB
testcase_36 AC 167 ms
22,292 KB
testcase_37 AC 131 ms
16,728 KB
testcase_38 AC 139 ms
17,460 KB
testcase_39 AC 34 ms
16,196 KB
testcase_40 AC 37 ms
16,616 KB
testcase_41 AC 168 ms
18,812 KB
testcase_42 AC 93 ms
14,148 KB
testcase_43 AC 198 ms
22,376 KB
testcase_44 AC 89 ms
14,072 KB
testcase_45 AC 83 ms
22,572 KB
testcase_46 AC 75 ms
12,600 KB
testcase_47 AC 50 ms
17,244 KB
testcase_48 AC 17 ms
8,704 KB
testcase_49 AC 17 ms
8,592 KB
testcase_50 AC 17 ms
8,620 KB
testcase_51 AC 17 ms
8,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from operator import itemgetter
from itertools import *
from bisect import *
from collections import *
from heapq import *
import sys

# input=sys.stdin.buffer.readline
input=sys.stdin.readline

sys.setrecursionlimit(10**6)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return input()[:-1]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

def gcd(a,b):
    while b:a,b=b,a%b
    return a

def solve(h):
    for a in aa:
        g = gcd(h, a)
        h //= g
        if h == 1:return "YES"
    return "NO"

n,h=MI()
aa=MI()
print(solve(h))

0