| 19195 | 2025-11-28 16:14:35 | kosztolnireka | Aranycipők (45) | csharp | Compilation error |
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();
}
}
}
open /var/local/lib/isolate/410/box/main.exe: no such file or directory
main.cs(31,38): error CS1955: The member `System.Collections.Generic.List<int>.Count' cannot be used as method or delegate
main.cs(41,39): error CS1955: The member `System.Collections.Generic.List<int>.Count' cannot be used as method or delegate
Compilation failed: 2 error(s), 0 warnings