結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-04-14 09:02:51 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 310 bytes |
| 記録 | |
| コンパイル時間 | 414 ms |
| コンパイル使用メモリ | 80,256 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-25 18:05:28 |
| 合計ジャッジ時間 | 1,807 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include <iostream>
using namespace std;
int main(){
long long n;cin>>n;
int ret = 0;
for(int i = 2; n >= i*i; i++){
int x = 0;
while(n%i == 0){
x++;n/=i;
}
ret ^= x;
}
if(n!=1){
ret ^= 1;
}
if(ret){
cout << "Alice" << endl;
}else{
cout << "Bob" << endl;
}
}