結果

問題 No.2 素因数ゲーム
ユーザー Unbakedbread
提出日時 2025-05-29 00:03:15
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 249 bytes
コンパイル時間 2,222 ms
コンパイル使用メモリ 191,164 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-05-29 00:03:19
合計ジャッジ時間 3,323 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
	int n;cin>>n;
	int xsum=0;
	for(int i=2;i*i<=n;i++){
		if(n%i) continue;
		int t=0;
		while(n%i==0){t++;n/=i;}
		xsum^=t;
	}if(n!=1) xsum^=1;
	cout<<(xsum?"Alice":"Bob")<<"\n";
	return 0;
}
0