結果
問題 | No.8 N言っちゃダメゲーム |
ユーザー | irogane |
提出日時 | 2019-06-27 15:46:03 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 57 ms / 5,000 ms |
コード長 | 695 bytes |
コンパイル時間 | 1,991 ms |
コンパイル使用メモリ | 100,920 KB |
実行使用メモリ | 22,724 KB |
最終ジャッジ日時 | 2023-09-10 09:48:41 |
合計ジャッジ時間 | 3,385 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 55 ms
20,692 KB |
testcase_01 | AC | 55 ms
20,636 KB |
testcase_02 | AC | 56 ms
22,672 KB |
testcase_03 | AC | 57 ms
20,564 KB |
testcase_04 | AC | 56 ms
20,668 KB |
testcase_05 | AC | 57 ms
22,724 KB |
testcase_06 | AC | 57 ms
20,720 KB |
testcase_07 | AC | 56 ms
20,652 KB |
testcase_08 | AC | 56 ms
18,596 KB |
testcase_09 | AC | 56 ms
18,572 KB |
testcase_10 | AC | 57 ms
20,672 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; class No8 { static void Main() { int loop = int.Parse( Console.ReadLine() ); string[][] rule = new string[loop][]; for( var i = 0; i < loop; i++ ){ rule[i] = Console.ReadLine().Split(" "); } for( var i = 0; i < loop; i++ ){ int max = int.Parse(rule[i][0]); int hand = int.Parse(rule[i][1]); Console.WriteLine(duel(max,hand)); } } static string duel(int max, int hand){ int remainder = (max - 1) % ( hand + 1 ); string result = "Win"; result = ( remainder == 0 ) ? "Lose" : result; result = ( hand + 1 < remainder ) ? "Lose" : result; return result; } }