結果

問題 No.1665 quotient replace
ユーザー Nzt3Nzt3
提出日時 2021-09-03 22:06:34
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 443 ms / 3,000 ms
コード長 485 bytes
コンパイル時間 1,423 ms
コンパイル使用メモリ 165,204 KB
実行使用メモリ 7,172 KB
最終ジャッジ日時 2023-08-21 22:01:10
合計ジャッジ時間 9,661 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
7,020 KB
testcase_01 AC 10 ms
7,016 KB
testcase_02 AC 10 ms
6,948 KB
testcase_03 AC 10 ms
6,984 KB
testcase_04 AC 10 ms
7,116 KB
testcase_05 AC 10 ms
6,888 KB
testcase_06 AC 12 ms
6,884 KB
testcase_07 AC 10 ms
7,000 KB
testcase_08 AC 12 ms
6,936 KB
testcase_09 AC 21 ms
6,992 KB
testcase_10 AC 152 ms
6,932 KB
testcase_11 AC 333 ms
6,932 KB
testcase_12 AC 42 ms
6,932 KB
testcase_13 AC 442 ms
6,944 KB
testcase_14 AC 443 ms
6,888 KB
testcase_15 AC 442 ms
6,932 KB
testcase_16 AC 437 ms
6,932 KB
testcase_17 AC 441 ms
6,884 KB
testcase_18 AC 9 ms
6,852 KB
testcase_19 AC 9 ms
7,008 KB
testcase_20 AC 10 ms
7,016 KB
testcase_21 AC 10 ms
6,852 KB
testcase_22 AC 10 ms
7,016 KB
testcase_23 AC 10 ms
6,996 KB
testcase_24 AC 10 ms
6,936 KB
testcase_25 AC 10 ms
7,064 KB
testcase_26 AC 11 ms
6,848 KB
testcase_27 AC 12 ms
6,928 KB
testcase_28 AC 20 ms
6,920 KB
testcase_29 AC 31 ms
6,944 KB
testcase_30 AC 179 ms
6,896 KB
testcase_31 AC 268 ms
6,852 KB
testcase_32 AC 320 ms
7,172 KB
testcase_33 AC 124 ms
6,888 KB
testcase_34 AC 266 ms
6,848 KB
testcase_35 AC 242 ms
7,000 KB
testcase_36 AC 252 ms
7,120 KB
testcase_37 AC 229 ms
7,008 KB
testcase_38 AC 272 ms
7,020 KB
testcase_39 AC 193 ms
6,948 KB
testcase_40 AC 191 ms
6,804 KB
testcase_41 AC 194 ms
7,004 KB
testcase_42 AC 10 ms
7,012 KB
testcase_43 AC 10 ms
7,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  int ans=0;
  vector<int>diver(1000005);
  iota(diver.begin(),diver.end(),0);
  for(long long i=2;i<1000005;i++){
    if(diver[i]!=i)continue;
    for(long long j=i*i;j<1000005;j+=i){
      diver[j]=i;
    }
  }
  for(int i=0,A;i<N;i++){
    cin>>A;
    int cnt=0;
    while(A!=1){
      cnt++;
      A/=diver[A];
    }
    ans^=cnt;
  }
  if(ans==0){
    cout<<"black\n";
  }else{
    cout<<"white\n";
  }
}
0