結果
| 問題 | No.1250 汝は倍数なりや? | 
| コンテスト | |
| ユーザー |  norioc | 
| 提出日時 | 2020-10-10 00:37:56 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 106 ms / 1,000 ms | 
| コード長 | 227 bytes | 
| コンパイル時間 | 593 ms | 
| コンパイル使用メモリ | 67,240 KB | 
| 最終ジャッジ日時 | 2025-01-15 06:04:46 | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 49 | 
ソースコード
#include <iostream>
#include <numeric>
using namespace std;
int main() {
    int n, h; cin >> n >> h;
    for (int i = 0; i < n; i++) {
        int a; cin >> a;
        h /= gcd(h, a);
    }
    puts(h == 1 ? "YES" : "NO");
}
            
            
            
        