結果
問題 |
No.3112 Decrement or Mod Game
|
ユーザー |
![]() |
提出日時 | 2025-04-20 18:06:55 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 433 bytes |
コンパイル時間 | 493 ms |
コンパイル使用メモリ | 39,680 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-04-20 18:06:58 |
合計ジャッジ時間 | 2,667 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 65 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:19:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 19 | scanf("%lld%lld", &a, &b); | ~~~~~^~~~~~~~~~~~~~~~~~~~
ソースコード
/* -*- coding: utf-8 -*- * * 3112.cc: No.3112 Decrement or Mod Game - yukicoder */ #include<cstdio> #include<algorithm> using namespace std; /* typedef */ using ll = long long; /* main */ int main() { ll a, b; scanf("%lld%lld", &a, &b); if (a == 1 || b == 1) puts("Alice"); else if (a > b + 1) puts("Alice"); else if (a == b + 1) puts("Bob"); else if (a == b) puts("Alice"); else puts("Bob"); return 0; }