結果
問題 |
No.79 過小評価ダメ・ゼッタイ
|
ユーザー |
![]() |
提出日時 | 2019-06-24 09:34:26 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,295 bytes |
コンパイル時間 | 2,703 ms |
コンパイル使用メモリ | 110,720 KB |
実行使用メモリ | 30,620 KB |
最終ジャッジ日時 | 2024-12-31 21:16:55 |
合計ジャッジ時間 | 3,542 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 13 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoderTest { class Program { static void Main(string[] args) { string aaaaaaa = Console.ReadLine(); string input = Console.ReadLine(); string[] num = new string[6]; int[] cnt = new int[6]; string[] level = input.Split(' '); for(int i=1;i<=num.Length;i++) { num[i - 1] = i.ToString(); cnt[i - 1] = 0; } for(int i=0;i<level.Length;i++) { string temp = level[i].Substring(0, 1); for(int j=0;j<num.Length;j++) { if(temp==num[j]) { cnt[j]++; } } } string ans = ""; for(int i=0;i<cnt.Length;i++) { for (int j = i + 1; j < cnt.Length; j++) { if (cnt[i] < cnt[j]) { ans = num[j]; } } } Console.WriteLine(ans); } } }