結果

問題 No.1250 汝は倍数なりや?
ユーザー 👑 Kazun
提出日時 2020-08-17 04:17:12
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 255 bytes
コンパイル時間 1,798 ms
コンパイル使用メモリ 53,400 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-15 06:37:07
合計ジャッジ時間 2,769 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 41 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>

using namespace std;

int main() {
	int N, H;
	cin >> N >> H;

	int X = 1;
	int A;

	for (int i = 0; i < N; i++) {
		cin >> A;
		X = (X * (A % H)) % H;
	}

	if (X == 0) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}
0