結果
| 問題 | No.1250 汝は倍数なりや? | 
| コンテスト | |
| ユーザー |  toshiro_yanagi | 
| 提出日時 | 2023-07-03 20:43:29 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 248 bytes | 
| コンパイル時間 | 229 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 31,276 KB | 
| 最終ジャッジ日時 | 2024-07-17 18:35:10 | 
| 合計ジャッジ時間 | 7,331 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 27 WA * 22 | 
ソースコード
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, ai)
print("YES" if abs(h) == 1 else "NO")
            
            
            
        