結果

問題 No.1250 汝は倍数なりや?
ユーザー Shiro_S
提出日時 2020-10-09 21:30:34
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 44 ms / 1,000 ms
コード長 299 bytes
コンパイル時間 1,809 ms
コンパイル使用メモリ 193,180 KB
最終ジャッジ日時 2025-01-15 04:00:23
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    int N, H;
    cin >> N >> H;
    for(int i=0; i<N; i++){
        int a;
        cin >> a;
        H /= gcd(H, a);
    }
    cout << (H==1 ? "YES" : "NO") << endl;
    return 0;
}
0