結果

問題 No.1665 quotient replace
ユーザー kotatsugamekotatsugame
提出日時 2021-09-03 21:28:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 333 bytes
コンパイル時間 641 ms
コンパイル使用メモリ 63,228 KB
実行使用メモリ 7,728 KB
最終ジャッジ日時 2023-08-21 19:43:27
合計ジャッジ時間 8,573 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
7,440 KB
testcase_01 AC 12 ms
7,388 KB
testcase_02 AC 12 ms
7,472 KB
testcase_03 WA -
testcase_04 AC 12 ms
7,500 KB
testcase_05 AC 12 ms
7,440 KB
testcase_06 AC 15 ms
7,452 KB
testcase_07 AC 12 ms
7,432 KB
testcase_08 AC 13 ms
7,436 KB
testcase_09 AC 24 ms
7,676 KB
testcase_10 AC 154 ms
7,436 KB
testcase_11 AC 327 ms
7,384 KB
testcase_12 AC 45 ms
7,384 KB
testcase_13 AC 428 ms
7,444 KB
testcase_14 AC 436 ms
7,516 KB
testcase_15 AC 436 ms
7,396 KB
testcase_16 AC 441 ms
7,532 KB
testcase_17 AC 440 ms
7,444 KB
testcase_18 AC 12 ms
7,496 KB
testcase_19 AC 12 ms
7,672 KB
testcase_20 AC 11 ms
7,452 KB
testcase_21 AC 12 ms
7,456 KB
testcase_22 WA -
testcase_23 AC 11 ms
7,476 KB
testcase_24 AC 11 ms
7,388 KB
testcase_25 WA -
testcase_26 AC 12 ms
7,444 KB
testcase_27 AC 14 ms
7,448 KB
testcase_28 AC 23 ms
7,392 KB
testcase_29 AC 34 ms
7,712 KB
testcase_30 AC 182 ms
7,528 KB
testcase_31 AC 271 ms
7,396 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 223 ms
7,532 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 190 ms
7,712 KB
testcase_42 AC 11 ms
7,384 KB
testcase_43 AC 12 ms
7,388 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:4:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    4 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
int isp[1<<20];
main()
{
	for(int i=2;i<1<<20;i++)if(!isp[i])
	{
		for(int j=i;j<1<<20;j+=i)isp[j]=i;
	}
	int N;
	cin>>N;
	int x=0;
	for(;N--;)
	{
		int A;cin>>A;
		while(A>1)
		{
			int p=isp[A];
			int cnt=0;
			while(A%p==0)A/=p,cnt++;
			x^=cnt;
		}
	}
	cout<<(x?"white":"black")<<endl;
}
0