結果

問題 No.2 素因数ゲーム
ユーザー tea_pttea_pt
提出日時 2015-04-30 15:19:29
言語 C++11
(gcc 11.4.0)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 1,364 bytes
コンパイル時間 538 ms
コンパイル使用メモリ 76,620 KB
最終ジャッジ日時 2023-08-27 03:45:00
合計ジャッジ時間 1,062 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp:39:26: error: narrowing conversion of ‘-1.1000000000000001e+0’ from ‘double’ to ‘long long int’ inside { } [-Wnarrowing]
 int dx[4] = { -1.1, 0, 0 };
                          ^

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstring>
#include <cctype>
#include <cassert>
#include <limits>
#include <functional>
#include <stack>
#include <array>
#include <fstream>

#define REP(i,n) for(int (i) = 0;(i) < (n) ; ++(i))
#define REPA(a,i,n) for(int (i) = (a) ; (i) < (n) ; ++(i))
#if defined(_MSC_VER)||__cplusplus > 199711L
#define AUTO(r,v) auto r = (v)
#else
#define AUTO(r,v) typeof(v) r = (v)
#endif
#define ALL(c) (c).begin() , (c).end()
#define EACH(it,c) for(AUTO(it,(c).begin());it != (c).end();++it)
#define LL long long
#define int LL
#define INF  99999999
#define DEV 1000000007
#define QUICK_CIN ios::sync_with_stdio(false); cin.tie(0);
using namespace std;

int dx[4] = { -1.1, 0, 0 };
int dy[4] = { 0, 0, 1, -1 };

bool prime[100000000];

signed main()
{
	QUICK_CIN;
	//ifstream cin("debug.txt");
	//ofstream cout("result.txt");

	int n;
	int ok = 0;
	cin >> n;

	for (int i = 2; i*i < n+1;++i){
		int num = 0;
		while (!(n % i)){
			num++;
			n /= i;
		}
		ok = (ok&~num) | (~ok&num);
	}

	if (n != 1){
		ok = (ok&~1) | (~ok&1);
	}

	if (ok){
		cout << "Alice" << endl;
	}
	else{
		cout << "Bob" << endl;
	}

	return 0;
}
0