結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー funakoshi
提出日時 2019-06-24 09:44:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 52 ms / 5,000 ms
コード長 1,245 bytes
コンパイル時間 1,039 ms
コンパイル使用メモリ 111,064 KB
実行使用メモリ 30,612 KB
最終ジャッジ日時 2024-12-31 22:26:27
合計ジャッジ時間 3,562 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

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 = "";
            int max = 0;
            for(int i=0;i<cnt.Length;i++)
            {


                if (max <= cnt[i])
                {
                    max = cnt[i];
                    ans = num[i];
                }
                
            }
            Console.WriteLine(ans);
        }
    }
}
0