Oddly Even
Plataforma: Hack The Box
Dificultad: Very Easy
Categoría: Coding
🔗 Link del challenge: https://app.hackthebox.com/challenges/Oddly%20Even
Descripción
The ghostly clock ticks strangely. Determine whether its chimes are even or odd to calm the restless spirits.
El reto provee un editor de código Python en el browser. El programa recibe un número y debe imprimir odd si es impar o even si es par.
Ejemplo:
| Input | Output |
|---|---|
| 3 | odd |
Solución
n = int(input())
print("odd" if n % 2 != 0 else "even")
Leemos el número con input(), evaluamos el residuo con % 2 y respondemos en consecuencia. Una línea es suficiente.

Flag
HTB{n0t_3v3n_cl0s3!}
Challenge Oddly Even de Hack The Box completado.