結果

問題 No.1250 汝は倍数なりや?
ユーザー keijak
提出日時 2020-10-09 21:22:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 161 ms / 1,000 ms
コード長 434 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 31,180 KB
最終ジャッジ日時 2024-07-20 08:08:14
合計ジャッジ時間 4,526 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import math

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))


def solve():
    n, h = inl()
    A = inl()
    for x in A:
        h //= math.gcd(x, h)
    return h == 1


print("YES" if solve() else "NO")
0