結果
| 問題 |
No.1250 汝は倍数なりや?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-15 20:54:06 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 584 bytes |
| コンパイル時間 | 1,636 ms |
| コンパイル使用メモリ | 166,344 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-23 01:22:02 |
| 合計ジャッジ時間 | 4,088 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 40 WA * 9 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
const long long INF = 1LL << 60;
template<class T> void chmin(T& a, T b) { if(a > b) { a = b; } }
template<class T> void Sort(vector<T>& input) { std::sort(input.begin(), input.end()); }
int main() {
int N, H;
cin >> N >> H;
vector<int> A = vector<int>(N, 0);
int p = 1;
for(int i=0; i<N; i++) {
int tmp;
cin >> tmp;
p = (p*tmp)%H;
}
//cout << p << endl;
if(p==0) cout << "YES" << endl;
else cout << "NO" << endl;
}