結果
問題 | No.8 N言っちゃダメゲーム |
ユーザー |
![]() |
提出日時 | 2023-04-28 10:14:29 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 841 bytes |
コンパイル時間 | 1,114 ms |
コンパイル使用メモリ | 112,232 KB |
実行使用メモリ | 25,112 KB |
最終ジャッジ日時 | 2024-11-17 11:15:08 |
合計ジャッジ時間 | 2,295 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 WA * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;using System.Linq;using System.Collections.Generic;namespace yukicoder{class Program{static void Main(string[] args){int P = int.Parse(Console.ReadLine());var array = new int[P,2];var winLose = new string[P];for(int i = 0;i < P;i++){var tempNK = Console.ReadLine().Split(' ').Select(c => int.Parse(c)).ToArray();array[i,0] = tempNK[0];array[i,1] = tempNK[1];}for(int i = 0;i < P;i++){int N = array[i,0];int K = array[i,1];if((N - 1)%(K + 1) == 0 && N - 1 > K + 1){winLose[i] = "Lose";}else{winLose[i] = "Win";}}for(int i = 0;i < P;i++){Console.WriteLine(winLose[i]);}}}}