結果
| 問題 | No.1250 汝は倍数なりや? | 
| コンテスト | |
| ユーザー |  toshiro_yanagi | 
| 提出日時 | 2023-07-03 20:57:21 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 248 bytes | 
| コンパイル時間 | 554 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 31,148 KB | 
| 最終ジャッジ日時 | 2024-07-17 18:51:23 | 
| 合計ジャッジ時間 | 4,633 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 35 TLE * 6 -- * 8 | 
ソースコード
def gcd(a, b):
    while min(a, b) > 0:
        a, b = max(a, b), min(a, b)
        a %= b
    return max(a, b)
(n, h), a = [[*map(int, input().split())] for _ in range(2)]
for ai in a:
    h //= gcd(h, abs(ai))
print("YES" if h == 1 else "NO")
            
            
            
        