結果

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

ソースコード

diff #

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

int main(){
  int m, k, f, s;
  cin >> m >> k;
  s = (m - 1) / (k + 1);
  f = m - 1 - s;
  f &= 1, s &= 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