結果

問題 No.1893 Cycle
ユーザー mobchanmobchan
提出日時 2023-04-23 13:57:16
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 715 bytes
コンパイル時間 9,776 ms
コンパイル使用メモリ 167,324 KB
実行使用メモリ 183,284 KB
最終ジャッジ日時 2024-04-25 10:26:48
合計ジャッジ時間 11,836 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
30,080 KB
testcase_01 AC 48 ms
30,208 KB
testcase_02 AC 49 ms
30,208 KB
testcase_03 AC 52 ms
30,080 KB
testcase_04 AC 51 ms
30,336 KB
testcase_05 AC 51 ms
30,312 KB
testcase_06 AC 57 ms
30,336 KB
testcase_07 AC 49 ms
30,336 KB
testcase_08 AC 47 ms
30,080 KB
testcase_09 AC 49 ms
30,208 KB
testcase_10 AC 48 ms
30,208 KB
testcase_11 AC 48 ms
30,336 KB
testcase_12 AC 49 ms
30,208 KB
testcase_13 AC 48 ms
30,336 KB
testcase_14 AC 47 ms
30,208 KB
testcase_15 AC 49 ms
30,208 KB
testcase_16 AC 48 ms
30,208 KB
testcase_17 AC 49 ms
30,208 KB
testcase_18 AC 54 ms
30,080 KB
testcase_19 AC 53 ms
30,080 KB
testcase_20 AC 52 ms
30,184 KB
testcase_21 AC 48 ms
30,080 KB
testcase_22 AC 46 ms
30,208 KB
testcase_23 AC 49 ms
183,284 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (119 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
/home/judge/data/code/Main.cs(13,17): warning CS0219: 変数 'count' は割り当てられていますが、その値は使用されていません [/home/judge/data/code/main.csproj]
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

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 array = new List<int>[] { new List<int> { 0, 4, 8 }, new List<int> { 1, 5, 9 }, new List<int> { 2, 6, 10 }, new List<int> { 3, 7, 11 } };
        for (int i = 0; i < 4; i++)
        {
            var count = 0;
            foreach (var item in input)
            {
                if (array[i].Contains(item)) array[i].Remove(item);
            }

            if (array[i].Count == 1)
            {
                Console.WriteLine(array[i][0]);
                break;
            }
        }
    }
}
0