結果

問題 No.1250 汝は倍数なりや?
ユーザー keisuke6
提出日時 2022-08-28 16:09:02
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 109 ms / 1,000 ms
コード長 256 bytes
コンパイル時間 1,871 ms
コンパイル使用メモリ 195,504 KB
最終ジャッジ日時 2025-02-06 22:22:36
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int N,H;
  cin>>N>>H;
  vector<int> S(N);
  for(int i=0;i<N;i++){
      cin>>S[i];
      H /= gcd(H,S[i]);
  } 
  if(H == 1) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
}
0