結果
問題 |
No.8 N言っちゃダメゲーム
|
ユーザー |
![]() |
提出日時 | 2019-06-27 15:46:03 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 5,000 ms |
コード長 | 695 bytes |
コンパイル時間 | 2,377 ms |
コンパイル使用メモリ | 103,552 KB |
実行使用メモリ | 18,048 KB |
最終ジャッジ日時 | 2024-06-28 01:16:00 |
合計ジャッジ時間 | 1,638 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
コンパイルメッセージ
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; } }