結果
問題 |
No.1314 N言っちゃダメゲーム (5)
|
ユーザー |
![]() |
提出日時 | 2020-12-11 00:11:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 367 bytes |
コンパイル時間 | 1,331 ms |
コンパイル使用メモリ | 166,884 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 20:54:53 |
合計ジャッジ時間 | 2,174 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int M, K; cin >> M >> K; int A = (M - 1) - (M - 1) / (K + 1); int win = (A + 1) / 2; if (A % 2 == 1){ win += M - 1 - A; } int lose = M - 1 - win; if (win > lose){ cout << "Win" << endl; } else if (win == lose){ cout << "Draw" << endl; } else { cout << "Lose" << endl; } }