結果

問題 No.3112 Decrement or Mod Game
ユーザー GOTKAKO
提出日時 2025-04-18 20:33:55
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 1,742 ms
コンパイル使用メモリ 192,416 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-04-18 20:34:04
合計ジャッジ時間 3,398 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 65
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    long long A,B; cin >> A >> B;
    if(A%B == 0 || A == 1) cout << "Alice" << endl;
    else{
        if(B%(A-1) == 0 || B == 1) cout << "Bob" << endl;
        else if(A >= B) cout << "Alice" << endl;
        else cout << "Bob" << endl;
    }
}
0