結果

問題 No.1665 quotient replace
ユーザー 沙耶花沙耶花
提出日時 2021-09-03 21:28:28
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 369 ms / 3,000 ms
コード長 591 bytes
コンパイル時間 5,134 ms
コンパイル使用メモリ 259,556 KB
実行使用メモリ 7,024 KB
最終ジャッジ日時 2023-08-21 19:44:23
合計ジャッジ時間 13,236 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
6,752 KB
testcase_01 AC 37 ms
6,968 KB
testcase_02 AC 37 ms
7,024 KB
testcase_03 AC 38 ms
6,728 KB
testcase_04 AC 37 ms
6,920 KB
testcase_05 AC 36 ms
6,912 KB
testcase_06 AC 39 ms
6,904 KB
testcase_07 AC 38 ms
6,904 KB
testcase_08 AC 38 ms
6,764 KB
testcase_09 AC 46 ms
6,752 KB
testcase_10 AC 148 ms
6,728 KB
testcase_11 AC 289 ms
6,840 KB
testcase_12 AC 63 ms
6,764 KB
testcase_13 AC 365 ms
6,916 KB
testcase_14 AC 365 ms
6,904 KB
testcase_15 AC 369 ms
6,916 KB
testcase_16 AC 368 ms
6,964 KB
testcase_17 AC 368 ms
6,908 KB
testcase_18 AC 37 ms
6,916 KB
testcase_19 AC 37 ms
6,964 KB
testcase_20 AC 37 ms
7,000 KB
testcase_21 AC 37 ms
6,724 KB
testcase_22 AC 37 ms
6,832 KB
testcase_23 AC 37 ms
6,864 KB
testcase_24 AC 36 ms
6,904 KB
testcase_25 AC 36 ms
6,980 KB
testcase_26 AC 37 ms
6,804 KB
testcase_27 AC 39 ms
6,860 KB
testcase_28 AC 47 ms
6,860 KB
testcase_29 AC 58 ms
6,980 KB
testcase_30 AC 198 ms
6,760 KB
testcase_31 AC 280 ms
6,724 KB
testcase_32 AC 277 ms
6,808 KB
testcase_33 AC 124 ms
7,012 KB
testcase_34 AC 229 ms
6,768 KB
testcase_35 AC 209 ms
7,024 KB
testcase_36 AC 219 ms
6,724 KB
testcase_37 AC 202 ms
6,960 KB
testcase_38 AC 232 ms
6,860 KB
testcase_39 AC 174 ms
6,964 KB
testcase_40 AC 175 ms
6,900 KB
testcase_41 AC 177 ms
6,724 KB
testcase_42 AC 37 ms
6,860 KB
testcase_43 AC 37 ms
6,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000001

int main(){
	
	vector<int> cnt(1000001,0);
	
	for(int i=2;i<cnt.size();i++){
		if(cnt[i]!=0)continue;
		for(int j=i;j<cnt.size();j+=i){
			int t = j;
			while(t%i==0){
				t /= i;
				cnt[j] ++;
			}
		}
	}
	
	int n;
	cin>>n;
	
	int x = 0;
	rep(i,n){
		int a;
		cin>>a;
		x ^= cnt[a];
	}
	//cout<<x<<endl;
	if(x==0)cout<<"black"<<endl;
	else cout<<"white"<<endl;
	
	return 0;
}
0