結果

問題 No.103 素因数ゲーム リターンズ
ユーザー Kiona1018Kiona1018
提出日時 2019-08-26 08:06:29
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 597 bytes
コンパイル時間 1,413 ms
コンパイル使用メモリ 143,732 KB
実行使用メモリ 4,988 KB
最終ジャッジ日時 2023-08-07 14:24:47
合計ジャッジ時間 2,224 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include<bits/stdc++.h>
#define rep(i,n,m) for(int i = (n); i <(m); i++)
#define rrep(i,n,m) for(int i = (n) - 1; i >=(m); i--)
using namespace std;
using ll = long long;

int main()
{
    int n;
    cin >> n;
    int ans = 0;
    rep(i, 0, n)
    {
        int m;
        cin >> m;

        rep(j, 2, m + 1)
        {
            int cnt = 0;
            while (m % j == 0)
            {
                m /= j;
                ++cnt;
            }
            ans ^= cnt;
        }
    }

    if (ans == 0)
        cout << "Bob" << endl;
    else
        cout << "Alice" << endl;
    return 0;
}
0