77832024-01-11 10:00:02NotYouFasor (40)csharpForditási hiba
class Program
    {
        static void Main(string[] args)
        {
            int[] s = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int n = s[0]; //fak szama
            int k = s[1]; //latotav
            int[] magas = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int jf = magas[0]; //jelenlegi fa magassága
            int ind = 1; //index
            for (int i = 0; i < n-k; i++)
            {
                if (jf<magas[i])
                {
                    jf = magas[i];
                    ind = i+1;
                }
            }
            Console.WriteLine(ind);
            Console.ReadLine();
        }
    }
}
Forditási hiba
exit status 1
Compilation failed: 1 error(s), 0 warnings