結果

問題 No.1250 汝は倍数なりや?
ユーザー 👑 Kazun
提出日時 2020-08-14 19:41:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 168 ms / 1,000 ms
コード長 205 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 82,368 KB
実行使用メモリ 107,776 KB
最終ジャッジ日時 2024-10-15 06:36:41
合計ジャッジ時間 4,880 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from math import gcd

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

for a in A:
    G=gcd(a,H)
    H//=G

    if H==1:
        print("YES")
        exit()

print("NO")
0