191962025-11-28 16:16:03kosztolnirekaAranycipők (45)csharpRuntime error 0/4514ms2928 KiB
using System;
using System.Collections.Generic;
using System.Linq;
//using System.Security.Cryptography;
//using System.Text;
//using System.Threading.Tasks;

namespace aranycipo
{
    class Program
    {
        static void Main(string[] args)
        {
            int jatekosok = int.Parse(Console.ReadLine());
            List<int> lista = new List<int>();
            for (int i = 0; i < jatekosok; i++)
            {
                lista.Add(int.Parse(Console.ReadLine()));
            }

            int max = 0;
            for (int i = 0; i < jatekosok; i++)
            {
                if (lista[i] > max)
                {
                    max = lista[i];
                }
            }
            int ajsz = 0;
            List<int> ajszi = new List<int>();
            for (int i = 0; i <lista.Count(); i++)
            {
                if (lista[i] == max)
                {
                    ajsz++;
                    ajszi.Add(i + 1);
                }
            }
            Console.WriteLine(max);
            Console.WriteLine(ajsz);
            for (int i = 0; i < ajszi.Count(); i++)
            {
                Console.WriteLine(ajszi[i]);
            }
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/45
1Runtime error0/014ms2772 KiB
2Runtime error0/014ms2592 KiB
3Runtime error0/314ms2928 KiB
4Runtime error0/314ms2680 KiB
5Runtime error0/314ms2764 KiB
6Runtime error0/314ms2612 KiB
7Runtime error0/314ms2916 KiB
8Runtime error0/314ms2752 KiB
9Runtime error0/314ms2760 KiB
10Runtime error0/314ms2520 KiB
11Runtime error0/314ms2760 KiB
12Runtime error0/314ms2640 KiB
13Runtime error0/314ms2744 KiB
14Runtime error0/314ms2736 KiB
15Runtime error0/314ms2684 KiB
16Runtime error0/314ms2864 KiB
17Runtime error0/314ms2836 KiB