結果

問題 No.1665 quotient replace
ユーザー Perceval
提出日時 2021-09-03 22:28:58
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 485 bytes
コンパイル時間 1,615 ms
コンパイル使用メモリ 168,488 KB
実行使用メモリ 16,164 KB
最終ジャッジ日時 2024-12-15 14:51:12
合計ジャッジ時間 21,801 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 25 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
bool is_prime(long long N) {
    if (N == 1) return false;
    for (long long i = 2; i * i <= N; ++i) {
        if (N % i == 0) return false;
    }
    return true;
}
int main(){
  ll n;
  cin>>n;
  vector<ll> vec(n);
  for(int i=0;i<n;i++){
    cin>>vec.at(i);
  }
  ll a=0;
  for(int i=0;i<n;i++){
    if(is_prime(vec.at(i))){
      a++;
    }
  }
  if(a%2==1){
    cout<<"black";
  }
  else{
    cout<<"white";
  }
}
0