結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー | fujita |
提出日時 | 2023-05-09 14:07:46 |
言語 | C# (.NET 8.0.203) |
結果 |
AC
|
実行時間 | 166 ms / 5,000 ms |
コード長 | 1,181 bytes |
コンパイル時間 | 11,761 ms |
コンパイル使用メモリ | 168,680 KB |
実行使用メモリ | 191,848 KB |
最終ジャッジ日時 | 2024-05-04 13:35:47 |
合計ジャッジ時間 | 15,001 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 50 ms
30,320 KB |
testcase_01 | AC | 159 ms
37,100 KB |
testcase_02 | AC | 45 ms
29,520 KB |
testcase_03 | AC | 44 ms
29,312 KB |
testcase_04 | AC | 46 ms
29,692 KB |
testcase_05 | AC | 152 ms
37,120 KB |
testcase_06 | AC | 45 ms
28,672 KB |
testcase_07 | AC | 45 ms
28,800 KB |
testcase_08 | AC | 45 ms
29,440 KB |
testcase_09 | AC | 45 ms
29,440 KB |
testcase_10 | AC | 46 ms
29,440 KB |
testcase_11 | AC | 45 ms
29,440 KB |
testcase_12 | AC | 45 ms
29,568 KB |
testcase_13 | AC | 45 ms
29,692 KB |
testcase_14 | AC | 112 ms
34,560 KB |
testcase_15 | AC | 84 ms
32,128 KB |
testcase_16 | AC | 131 ms
36,080 KB |
testcase_17 | AC | 78 ms
32,256 KB |
testcase_18 | AC | 128 ms
35,836 KB |
testcase_19 | AC | 106 ms
34,176 KB |
testcase_20 | AC | 156 ms
36,864 KB |
testcase_21 | AC | 47 ms
30,192 KB |
testcase_22 | AC | 87 ms
33,012 KB |
testcase_23 | AC | 166 ms
36,480 KB |
testcase_24 | AC | 161 ms
191,848 KB |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (83 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; namespace yukicoder { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int count = 0 , maxcount = 0 , num = 0; var str = Console.ReadLine(); var g = str.Split(" "); string[] strings = new string[g.Length]; for (int i = 0; i < g.Length; i++) { strings[i] = g[i];//入力された文字を配列に } Array.Sort(strings); for (int j = 0; j < strings.Length - 1; j++) { if (strings[j] == strings[j + 1]) { count++; if (maxcount <= count) { maxcount = count; num = int.Parse(strings[j]); } } else { count = 0; } } if (num == 0) { num = int.Parse(strings[strings.Length - 1]); } Console.WriteLine(num); } } }