結果
問題 | No.1250 汝は倍数なりや? |
ユーザー |
|
提出日時 | 2024-05-17 06:12:38 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 85 ms / 1,000 ms |
コード長 | 453 bytes |
コンパイル時間 | 3,174 ms |
コンパイル使用メモリ | 244,128 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-20 11:30:22 |
合計ジャッジ時間 | 5,652 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 49 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() const int MAX = 1e9; const int MIN = -1*1e9; const ll MAXLL = 1e18; const ll MINLL = -1*1e18; int main() { ll N,H,Sum=1; cin >> N >> H; for(int i = 0; i < N; i++) { ll A; cin >> A; Sum *= A; Sum %= H; } cout << (Sum == 0 ? "YES" : "NO") << endl; return 0; }