結果

問題 No.548 国士無双
ユーザー PE11PE11
提出日時 2017-10-26 17:32:38
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,152 bytes
コンパイル時間 2,409 ms
コンパイル使用メモリ 103,808 KB
実行使用メモリ 23,668 KB
最終ジャッジ日時 2023-09-19 08:43:11
合計ジャッジ時間 4,984 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
21,448 KB
testcase_01 AC 60 ms
21,420 KB
testcase_02 AC 60 ms
21,348 KB
testcase_03 AC 60 ms
21,448 KB
testcase_04 AC 60 ms
21,400 KB
testcase_05 AC 59 ms
19,352 KB
testcase_06 AC 60 ms
19,424 KB
testcase_07 AC 61 ms
21,528 KB
testcase_08 AC 60 ms
23,384 KB
testcase_09 AC 60 ms
21,520 KB
testcase_10 AC 61 ms
23,456 KB
testcase_11 AC 61 ms
21,460 KB
testcase_12 AC 60 ms
21,428 KB
testcase_13 AC 60 ms
23,496 KB
testcase_14 AC 59 ms
19,548 KB
testcase_15 AC 60 ms
21,652 KB
testcase_16 AC 60 ms
21,448 KB
testcase_17 AC 60 ms
21,284 KB
testcase_18 AC 60 ms
21,496 KB
testcase_19 AC 60 ms
21,360 KB
testcase_20 WA -
testcase_21 AC 60 ms
21,356 KB
testcase_22 AC 58 ms
23,356 KB
testcase_23 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YukiCoder
{
	public class RisingSun
	{
		private static Dictionary<char, int> HoldingTiles = new Dictionary<char, int>()
		{
			{'a',0},
			{'b',0},
			{'c',0},
			{'d',0},
			{'e',0},
			{'f',0},
			{'g',0},
			{'h',0},
			{'i',0},
			{'j',0},
			{'k',0},
			{'l',0},
			{'m',0},
		};

		public static void Main()
		{
			List<char> NowHolding = Console.ReadLine().ToCharArray().ToList<char>();

			foreach(var TargetHolding in NowHolding)
			{
				if (HoldingTiles.ContainsKey(TargetHolding) == false)
					continue;

				HoldingTiles[TargetHolding] = HoldingTiles[TargetHolding] + 1;
			}

			Possible();
		}

		public static void Possible()
		{
			if (HoldingTiles.Count(x => x.Value == 0) > 2)
			{
				Console.WriteLine("Impossible");
				return;
			}

			var NotHaving = HoldingTiles.Where(x => x.Value == 0).FirstOrDefault();

			if(NotHaving.Key != 0)
			{
				Console.WriteLine(NotHaving.Key);
				return;
			}

			foreach(var Tile in HoldingTiles.Keys)
			{
				Console.WriteLine(Tile);
				return;
			}
		}
	
	}
}
0