結果
| 問題 |
No.2 素因数ゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-11 03:10:39 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 340 ms / 5,000 ms |
| コード長 | 547 bytes |
| コンパイル時間 | 808 ms |
| コンパイル使用メモリ | 64,712 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 13:19:13 |
| 合計ジャッジ時間 | 2,703 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <utility>
#include <vector>
using namespace std;
int main(void)
{
int n;
cin >> n;
vector<int> c(0);
int x = 0;
int count;
for(int i = 2; i <= n; i++)
{
count = 0;
while(n%i==0)
{
n/=i;
count++;
}
if(count>0)
x = x ^ count;
}
if(x!=0)
cout << "Alice\n";
else
cout << "Bob\n";
return 0;
}