結果
| 問題 | 
                            No.1893 Cycle
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2023-04-23 13:57:16 | 
| 言語 | C#  (.NET 8.0.404)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 56 ms / 2,000 ms | 
| コード長 | 715 bytes | 
| コンパイル時間 | 9,557 ms | 
| コンパイル使用メモリ | 168,740 KB | 
| 実行使用メモリ | 186,020 KB | 
| 最終ジャッジ日時 | 2024-11-07 21:03:48 | 
| 合計ジャッジ時間 | 11,459 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (91 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/
ソースコード
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;
            }
        }
    }
}