結果
問題 |
No.1665 quotient replace
|
ユーザー |
![]() |
提出日時 | 2021-09-03 22:17:15 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 563 bytes |
コンパイル時間 | 1,958 ms |
コンパイル使用メモリ | 195,024 KB |
最終ジャッジ日時 | 2025-01-24 06:02:01 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 39 TLE * 2 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include<bits/stdc++.h> using namespace std; int prime_factor(ll x){ int res=0; for(ll i=2;i*i<=x;i++){ while(x%i==0){ res++; x/=i; } } if(x!=1) res++; return res; } int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin>>n; vector<int> A(n); rep(i,n) cin>>A[i]; int ans=0; rep(i,n) ans^=prime_factor(A[i]); if(ans==0) cout<<"black"<<endl; else cout<<"white"<<endl; return 0; }