結果

問題 No.1314 N言っちゃダメゲーム (5)
ユーザー t98slider
提出日時 2022-12-20 14:51:32
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 353 bytes
コンパイル時間 1,834 ms
コンパイル使用メモリ 167,916 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-18 01:50:17
合計ジャッジ時間 2,853 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
  ll m, k, f, s, a, b;
  cin >> m >> k;
  s = (m - 1) / (k + 1);
  f = m - 1 - s;
  f &= 1;
  string ans;
  if(f == 0 && s == 0)ans = "Draw";
  if(f == 1 && s == 0)ans = "Win";
  if(f == 0 && s >= 1)ans = "Lose";
  if(f == 1 && s == 1)ans = "Win";
  cout << ans << '\n';
}
0