Otro problema de Divisores


Submit solution

Points: 100 (partial)
Time limit: 9.8s
Java 8 25.0s
Python 30.0s
Memory limit: 64M
Java 8 192M
Python 192M

Author:
Problem types
Allowed languages
Ada, Assembly, Awk, BrainF***, C, C#, C++, Dart, Go, Java, JS, Kotlin, Lua, Pascal, Perl, Prolog, Python, Scala, Swift, VB

Dados varios números enteros, usted debe decir cuál de ellos tiene la mayor cantidad de divisores. En caso de existir empates, debe mostrar solamente el menor de los números ganadores.

DESCRIPCIÓN DE LA ENTRADA:

La primera línea contiene un número entero positivo N (0 < N \leq 5*10^6), la cantidad de números a tener en cuenta. Seguidamente, la entrada tendrá N líneas, cada una con un entero positivo X_i (0 < X_i \leq 10^7), los números a tener en cuenta.

DESCRIPCIÓN DE LA SALIDA:

Usted imprimirá un entero positivo en una línea, número que mayor cantidad de divisores tiene. Recuerde, en caso de existir empates, deberá imprimir el menor número de entre los que comparten la cantidad máxima de divisores.

ENTRADA DE EJEMPLO:

5
1
2
4
5
9

SALIDA DE EJEMPLO:

4

Comments


  • -6
    Mauricio  commented on Dec. 23, 2023, 3:02 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -13
    Bryanm  commented on Nov. 20, 2019, 5:16 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -10
    Bryanm  commented on Nov. 20, 2019, 4:40 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.