結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー 👑 はまやんはまやんはまやんはまやん
提出日時 2019-06-22 15:20:08
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 867 bytes
コンパイル時間 1,058 ms
コンパイル使用メモリ 67,852 KB
実行使用メモリ 29,708 KB
最終ジャッジ日時 2023-08-27 02:50:33
合計ジャッジ時間 4,476 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
22,320 KB
testcase_01 AC 102 ms
29,708 KB
testcase_02 AC 68 ms
21,980 KB
testcase_03 AC 69 ms
23,952 KB
testcase_04 AC 68 ms
21,988 KB
testcase_05 AC 102 ms
25,660 KB
testcase_06 AC 68 ms
23,936 KB
testcase_07 AC 66 ms
21,900 KB
testcase_08 AC 67 ms
21,996 KB
testcase_09 AC 67 ms
21,996 KB
testcase_10 AC 67 ms
19,856 KB
testcase_11 AC 69 ms
24,060 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 89 ms
24,092 KB
testcase_15 AC 81 ms
25,100 KB
testcase_16 AC 94 ms
27,040 KB
testcase_17 AC 81 ms
23,020 KB
testcase_18 AC 94 ms
27,048 KB
testcase_19 AC 89 ms
23,996 KB
testcase_20 AC 102 ms
28,284 KB
testcase_21 AC 76 ms
24,260 KB
testcase_22 AC 85 ms
23,396 KB
testcase_23 AC 99 ms
27,540 KB
testcase_24 AC 100 ms
27,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

namespace proconCSharp
{
    class Program
    {
        static int GetInt()
        {
            return int.Parse(Console.ReadLine());
        }

        static int[] GetInts()
        {
            return Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
        }

        static void Main()
        {
            var N = GetInt();
            var L = GetInts();

            var group = L.GroupBy(x => x);

            int ma = 0, ans = 0;
            foreach (var g in group)
            {
                if (ma <= g.Count())
                {
                    ma = g.Count();
                    ans = g.ElementAt(0);
                }
            }
            
            Console.WriteLine($"{ans}");
        }
    }
}
0