結果

問題 No.1250 汝は倍数なりや?
ユーザー Md Shahinur RahmanMd Shahinur Rahman
提出日時 2020-10-09 22:11:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,195 bytes
コンパイル時間 1,886 ms
コンパイル使用メモリ 165,320 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-20 11:57:26
合計ジャッジ時間 3,406 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 34 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

/*******************************
* BASMILLAHHIR RAHMANNIR RAHIM *
* MD SHAHINUR RAHMAN           *
* DATE: 05/oct/2020            *
* DEPT. OF CSE                 *
* LEADING UNIVERSITY, SYLHET   *
*******************************/
#include<bits/stdc++.h>
#include<vector>
#include<algorithm>
#include<string>
#include<stdlib.h>
#include<math.h>
#define shahin std::ios_base::sync_with_stdio(false); std::cin.tie(NULL);
#define ll long long
#define pb push_back
#define sz(x) (int)(x).size()
const int nax=1000*1007;
const int mod = 1e9 + 7;
int ar[120][120];
using namespace std;
char wcz[nax];

bool fu(int a, int b){
    return (a>b);
}
int gcd(int x,int y){
    return x?gcd(y%x, x):y;
}


void fun(){
                ll n,h;
                cin >> n >> h;
                ll a[n],sum=1;
                for(int i=0;i<n;i++){
                                cin >> a[i];
                                sum *= a[i];
                }
                if(sum%h==0)cout << "YES";
                else cout << "NO";
}


int main()
{
    shahin
   /* ll tc,i=1,sum=0,A=0,B=0;
    cin >> tc;
    while(tc--)
    {
    //cout << "Case " << i << ": ";
        fun();
    //i++;
    }*/ 
   fun();

}
0