結果

問題 No.2 素因数ゲーム
ユーザー koyumeishi
提出日時 2014-11-17 20:37:14
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 547 bytes
コンパイル時間 611 ms
コンパイル使用メモリ 75,692 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-01-02 16:48:20
合計ジャッジ時間 1,540 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>

using namespace std;

long long divisors(long long N){
	long long ret = 0;
	for(long long i=2; i*i<=N; i++){
		long long tmp = 0;
		while(N%i==0){
			tmp++;
			N/=i;
		}
		ret ^= tmp;
	}
	if(N!=1){
		ret ^= 1;
	}
	return ret;
}

int main(){
	long long n;
	cin >> n;
	long long ans = divisors(n);
	cout << (ans==0?"BoB":"Alice") << endl;
	return 0;
}
0