█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 5247

Problema 0x62 - Contar elementos mayores a X en un arreglo pequeño

  • Autor: dvsalcedo
  • Fecha: 2021-10-30 00:00:20 UTC (Hace alrededor de 1 año)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      Main.cs(15,29): error CS1502: The best overloaded method match for `long.Parse(string)' has some invalid arguments
/usr/local/mono-6.6.0.161/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Main.cs(15,35): error CS1503: Argument `#1' cannot convert `string[]' expression to type `string'
Compilation failed: 2 error(s), 0 warnings

                    
#2
Error de compilación
                      Main.cs(15,29): error CS1502: The best overloaded method match for `long.Parse(string)' has some invalid arguments
/usr/local/mono-6.6.0.161/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Main.cs(15,35): error CS1503: Argument `#1' cannot convert `string[]' expression to type `string'
Compilation failed: 2 error(s), 0 warnings

                    
#3
Error de compilación
                      Main.cs(15,29): error CS1502: The best overloaded method match for `long.Parse(string)' has some invalid arguments
/usr/local/mono-6.6.0.161/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Main.cs(15,35): error CS1503: Argument `#1' cannot convert `string[]' expression to type `string'
Compilation failed: 2 error(s), 0 warnings

                    
#4
Error de compilación
                      Main.cs(15,29): error CS1502: The best overloaded method match for `long.Parse(string)' has some invalid arguments
/usr/local/mono-6.6.0.161/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Main.cs(15,35): error CS1503: Argument `#1' cannot convert `string[]' expression to type `string'
Compilation failed: 2 error(s), 0 warnings

                    
#5
Error de compilación
                      Main.cs(15,29): error CS1502: The best overloaded method match for `long.Parse(string)' has some invalid arguments
/usr/local/mono-6.6.0.161/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Main.cs(15,35): error CS1503: Argument `#1' cannot convert `string[]' expression to type `string'
Compilation failed: 2 error(s), 0 warnings

                    
#6
Error de compilación
                      Main.cs(15,29): error CS1502: The best overloaded method match for `long.Parse(string)' has some invalid arguments
/usr/local/mono-6.6.0.161/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Main.cs(15,35): error CS1503: Argument `#1' cannot convert `string[]' expression to type `string'
Compilation failed: 2 error(s), 0 warnings

                    
#7
Error de compilación
                      Main.cs(15,29): error CS1502: The best overloaded method match for `long.Parse(string)' has some invalid arguments
/usr/local/mono-6.6.0.161/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Main.cs(15,35): error CS1503: Argument `#1' cannot convert `string[]' expression to type `string'
Compilation failed: 2 error(s), 0 warnings

                    
#8
Error de compilación
                      Main.cs(15,29): error CS1502: The best overloaded method match for `long.Parse(string)' has some invalid arguments
/usr/local/mono-6.6.0.161/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Main.cs(15,35): error CS1503: Argument `#1' cannot convert `string[]' expression to type `string'
Compilation failed: 2 error(s), 0 warnings

                    
#9
Error de compilación
                      Main.cs(15,29): error CS1502: The best overloaded method match for `long.Parse(string)' has some invalid arguments
/usr/local/mono-6.6.0.161/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Main.cs(15,35): error CS1503: Argument `#1' cannot convert `string[]' expression to type `string'
Compilation failed: 2 error(s), 0 warnings

                    
#10
Error de compilación
                      Main.cs(15,29): error CS1502: The best overloaded method match for `long.Parse(string)' has some invalid arguments
/usr/local/mono-6.6.0.161/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Main.cs(15,35): error CS1503: Argument `#1' cannot convert `string[]' expression to type `string'
Compilation failed: 2 error(s), 0 warnings

                    
Puntos totales: 0 / 100

Código

using System;

public class Program
{
   public static void Main()
   {
      var length = Console.ReadLine();
      var input = Console.ReadLine();
      var numbers = input.Split(' ');
      input = Console.ReadLine();
      var countQueries = input.Split(' ');
      input = Console.ReadLine();
      var queries = input.Split(' ');

      for (int i=0; i<Int64.Parse(countQueries) - 1; i++) {
         int greaterNumber = 0;
         for (int j=0; j<Int64.Parse(length) - 1; j++) {
       if(Int32.Parse(queries[i]) < Int32.Parse(numbers[j])) {
           greaterNumber++;
       }
     }
      Console.WriteLine(greaterNumber);
   }
}
}