結果

問題 No.1250 汝は倍数なりや?
ユーザー 👑 CleyL
提出日時 2021-11-13 16:37:54
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 114 ms / 1,000 ms
コード長 291 bytes
コンパイル時間 859 ms
コンパイル使用メモリ 70,460 KB
最終ジャッジ日時 2025-01-25 17:43:52
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <numeric>

using namespace std;
int main(){
    int n,k;cin>>n>>k;
    for(int i = 0; n > i; i++){
        int t;cin>>t;
        k = k/gcd(t,k);
    }
    if(k==1){
        cout << "YES" << endl;
    }else{
        cout << "NO" << endl;
    }
}
0