結果
| 問題 | No.1250 汝は倍数なりや? | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-12-03 02:08:46 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 110 ms / 1,000 ms | 
| コード長 | 160 bytes | 
| コンパイル時間 | 1,660 ms | 
| コンパイル使用メモリ | 165,500 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-13 11:01:15 | 
| 合計ジャッジ時間 | 4,303 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 49 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
    int n,h,x;
    cin>>n>>h;
    while(n--)cin>>x,h/=__gcd(h,x);
    cout<<(h==1?"YES":"NO")<<endl;
}
            
            
            
        