結果

問題 No.2 素因数ゲーム
ユーザー illanastyillanasty
提出日時 2021-12-22 19:41:25
言語 C++17(clang)
(14.0.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 999 bytes
コンパイル時間 4,544 ms
コンパイル使用メモリ 108,912 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-14 20:50:04
合計ジャッジ時間 6,321 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,352 KB
testcase_01 AC 2 ms
4,352 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 2 ms
4,352 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 1 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,352 KB
testcase_12 AC 1 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,352 KB
testcase_16 AC 1 ms
4,348 KB
testcase_17 AC 1 ms
4,348 KB
testcase_18 AC 1 ms
4,348 KB
testcase_19 AC 1 ms
4,352 KB
testcase_20 AC 2 ms
4,348 KB
testcase_21 AC 2 ms
4,352 KB
testcase_22 AC 2 ms
4,352 KB
testcase_23 AC 1 ms
4,352 KB
testcase_24 AC 2 ms
4,352 KB
testcase_25 AC 1 ms
4,348 KB
testcase_26 AC 2 ms
4,352 KB
testcase_27 AC 2 ms
4,348 KB
testcase_28 AC 2 ms
4,352 KB
testcase_29 AC 1 ms
4,352 KB
testcase_30 AC 1 ms
4,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>


using namespace std;
using LL = long long;
using LD = long double;


#define ALL(v) begin(v), end(v)
#define REP(i, n) for (LL i = 0; (i) < (LL)(n); ++(i))
#define REPR(i, n) for (LL i = (LL)(n)-1; (i) >= 0; --(i))
#define REP2(i, n, m) for (LL i = (LL)(n); (i) < (LL)(m); ++(i))
#define REP2R(i, n, m) for (LL i = (LL)(n)-1; (i) >= (LL)(m); --(i))


int main() {
  int N;
  cin >> N;

  map<int,int> cnt;
  REP2(i, 2, sqrt(N)+1) {
    if (N % i == 0) {
      while (N % i == 0) {
        N /= i;
        ++cnt[i];
      }
    }
  }

  if (N != 1) ++cnt[N];
  
  int xsum = 0;
  for (auto [a, b] : cnt) xsum ^= b;

  cout << (xsum ? "Alice" : "Bob") << endl;
  return 0;
}
0