結果
問題 | No.8 N言っちゃダメゲーム |
ユーザー | suzu |
提出日時 | 2023-04-28 10:14:29 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 841 bytes |
コンパイル時間 | 2,510 ms |
コンパイル使用メモリ | 104,680 KB |
実行使用メモリ | 23,852 KB |
最終ジャッジ日時 | 2023-08-11 00:11:59 |
合計ジャッジ時間 | 3,447 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 56 ms
21,660 KB |
testcase_01 | AC | 56 ms
21,800 KB |
testcase_02 | AC | 54 ms
21,712 KB |
testcase_03 | WA | - |
testcase_04 | AC | 55 ms
23,852 KB |
testcase_05 | AC | 56 ms
21,636 KB |
testcase_06 | AC | 57 ms
23,696 KB |
testcase_07 | AC | 58 ms
21,760 KB |
testcase_08 | AC | 55 ms
21,728 KB |
testcase_09 | AC | 56 ms
21,640 KB |
testcase_10 | AC | 54 ms
21,760 KB |
コンパイルメッセージ
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]); } } } }