結果
問題 | No.1250 汝は倍数なりや? |
ユーザー | chacoder1 |
提出日時 | 2020-11-26 22:59:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 93 ms / 1,000 ms |
コード長 | 284 bytes |
コンパイル時間 | 2,318 ms |
コンパイル使用メモリ | 191,452 KB |
最終ジャッジ日時 | 2025-01-16 05:54:12 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 49 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int N,H; cin>>N>>H; long long temp=1; long long res=1; for(int i=0;i<N;i++){ cin>>temp; res*=temp; res%=H; } if(res==0){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }