結果
| 問題 |
No.1665 quotient replace
|
| コンテスト | |
| ユーザー |
asumo0729
|
| 提出日時 | 2021-09-03 22:01:13 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 567 bytes |
| コンパイル時間 | 711 ms |
| コンパイル使用メモリ | 119,680 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-15 13:17:50 |
| 合計ジャッジ時間 | 5,191 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 4 WA * 20 RE * 17 |
ソースコード
#include <iostream>
using namespace std;
int A[100009];
int x = 0;
int N;
int factorize(int x){
for (int i = 2; i * i <= x; i++){
int cnt = 0;
if (x % i == 0){
while (x % i == 0) x = x/ i;
}
}
return 0;
}
int main(){
cin >> N;
for (int i = 0; i < N; i++){
cin >> A[i];
}
for (int i = 0; i < N; i++){
int cnt;
cnt = factorize(A[i]);
x ^= cnt;
}
if (x == 0){
cout << "black" << endl;
}
else{
cout << "white" << endl;
}
return 0;
}
asumo0729