結果

問題 No.2 素因数ゲーム
ユーザー tai96
提出日時 2015-02-20 20:52:56
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 331 ms / 5,000 ms
コード長 249 bytes
コンパイル時間 705 ms
コンパイル使用メモリ 53,748 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-26 11:01:18
合計ジャッジ時間 2,223 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main(){
	int n;
	std::cin >> n;

	int k = 0;

	int i = 2, cnt = 0;
	while (n > 1){
		if (n % i == 0)n /= i, cnt++;
		else k ^= cnt, i++, cnt = 0;
	}
	k ^= cnt;

	std::cout << (k ? "Alice" : "Bob") << std::endl;

	return 0;
}
0