結果
| 問題 | No.1250 汝は倍数なりや? | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-03-15 10:02:59 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 80 ms / 1,000 ms | 
| コード長 | 305 bytes | 
| コンパイル時間 | 1,717 ms | 
| コンパイル使用メモリ | 167,024 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-09-22 01:03:50 | 
| 合計ジャッジ時間 | 5,153 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 49 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
    int N;
    cin>>N;
    long long H;
    cin>>H;
    long long A[202020];
    for(int i=1;i<=N;i++)cin>>A[i];
    long long count=1;
    for(int i=1;i<=N;i++)count=(count*(A[i]))%H;
    if(count==0)cout<<"YES";
    else cout<<"NO";
  
    
}
            
            
            
        