結果
| 問題 | No.2 素因数ゲーム | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-10-14 02:18:52 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 5,000 ms | 
| コード長 | 220 bytes | 
| コンパイル時間 | 739 ms | 
| コンパイル使用メモリ | 64,468 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-21 07:55:01 | 
| 合計ジャッジ時間 | 2,063 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 31 | 
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main()
      | ^~~~
            
            ソースコード
#include<iostream>
using namespace std;
long N;
int X;
main()
{
	cin>>N;
	for(int i=2;i*i<=N;i++)
	{
		if(N%i==0)
		{
			int c=0;
			while(N%i==0)N/=i,c++;
			X^=c;
		}
	}
	if(N>1)X^=1;
	cout<<(X?"Alice":"Bob")<<endl;
}
            
            
            
        