結果

問題 No.1250 汝は倍数なりや?
ユーザー hatsuka_iwa
提出日時 2021-02-14 05:02:44
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 281 bytes
コンパイル時間 1,615 ms
コンパイル使用メモリ 165,812 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-21 09:10:02
合計ジャッジ時間 2,898 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 35 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N, H;
  int64_t A = 1;
  cin >> N >> H;
  
  for (int i = 0; i < N; i++) {
    int B;
    cin >> B;
    A *= B;
    if (A % H == 0) {
      cout << "YES" << endl;
      return 0;
    }
  }

  cout << "NO" << endl;
}
0