結果

問題 No.1314 N言っちゃダメゲーム (5)
ユーザー kotatsugame
提出日時 2020-12-11 00:07:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 178 bytes
コンパイル時間 520 ms
コンパイル使用メモリ 63,416 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-19 20:54:04
合計ジャッジ時間 1,216 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
int M,K;
main()
{
	cin>>M>>K;
	int y=M/(K+1);
	int x=M-1-y;
	int z=x%2?x/2+1+y:x/2;
	cout<<(2*z>M-1?"Win":2*z<M-1?"Lose":"Draw")<<endl;
}
0