結果
問題 | No.1314 N言っちゃダメゲーム (5) |
ユーザー |
|
提出日時 | 2022-12-20 14:59:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 338 bytes |
コンパイル時間 | 1,773 ms |
コンパイル使用メモリ | 165,964 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-18 01:50:32 |
合計ジャッジ時間 | 2,609 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
#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; string ans; if(f & 1)ans = "Win"; else if(s == 0)ans = "Draw"; else ans = "Lose"; cout << ans << '\n'; }