結果

問題 No.8 N言っちゃダメゲーム
ユーザー masa
提出日時 2015-01-19 03:40:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 405 bytes
コンパイル時間 396 ms
コンパイル使用メモリ 60,432 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-22 19:06:41
合計ジャッジ時間 949 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>

using namespace std;

void solve(int n, int k) {
	int winpoint = (n - 1) % (k + 1);
	if (1 <= winpoint && winpoint <= k) {
		cout << "Win" << endl;
	} else {
		cout << "Lose"<< endl;
	}
}

int main() {
	int p, n, k;
	cin >> p;

	for (int i = 0; i < p; i++) {
		cin >> n >> k;
		solve(n, k);
	}

	return 0;
}
0