結果
問題 | No.1934 Four Fruits |
ユーザー | mobchan |
提出日時 | 2023-04-23 13:12:20 |
言語 | C# (.NET 8.0.203) |
結果 |
AC
|
実行時間 | 59 ms / 2,000 ms |
コード長 | 889 bytes |
コンパイル時間 | 11,688 ms |
コンパイル使用メモリ | 166,912 KB |
実行使用メモリ | 184,832 KB |
最終ジャッジ日時 | 2024-04-25 09:53:23 |
合計ジャッジ時間 | 12,734 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 50 ms
30,208 KB |
testcase_01 | AC | 48 ms
30,336 KB |
testcase_02 | AC | 49 ms
30,080 KB |
testcase_03 | AC | 50 ms
30,208 KB |
testcase_04 | AC | 49 ms
30,292 KB |
testcase_05 | AC | 51 ms
30,208 KB |
testcase_06 | AC | 59 ms
30,208 KB |
testcase_07 | AC | 53 ms
30,208 KB |
testcase_08 | AC | 50 ms
30,208 KB |
testcase_09 | AC | 50 ms
184,832 KB |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (101 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var input = Console.ReadLine().Split().Select(int.Parse).ToArray(); var dic = new Dictionary<int, int> { { 0, 0 }, { 1, 0 }, { 2, 0 }, { 3, 0 } }; foreach (var item in input) dic[item]++; if (dic.ContainsValue(3)) { foreach (var item in dic) { if (item.Value == 3) Console.WriteLine(item.Key); } } else if (dic.ContainsValue(2)) { foreach (var item in dic) { if (item.Value == 1) Console.WriteLine(item.Key); } } else { foreach (var item in dic) { if (item.Value == 0) Console.WriteLine(item.Key); } } } }