結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
srup٩(๑`н´๑)۶
|
| 提出日時 | 2016-09-13 21:18:47 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 193 ms / 5,000 ms |
| コード長 | 403 bytes |
| 記録 | |
| コンパイル時間 | 615 ms |
| コンパイル使用メモリ | 83,436 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-01 09:54:04 |
| 合計ジャッジ時間 | 5,477 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include <iostream>
#include <algorithm>
#include <queue>
#include <tuple>
#include <cstdio>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)
int main(void){
int n; cin >> n;
int sum = 0;
for (int i = 2; i <= n; ++i){
int cnt = 0;
while(n % i == 0){
cnt++; n /= i;
}
sum ^= cnt;//xor
}
if(sum == 0)printf("Bob\n");
else printf("Alice\n");
return 0;
}
srup٩(๑`н´๑)۶