CorvusDDosKRom

Hack The Box: Oddly Even

Very Easy

Oddly Even es un challenge de Coding de nivel Very Easy en Hack The Box. Dado un número, debemos imprimir "odd" si es impar o "even" si es par.

Hack The Box
Coding Python Scripting

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:

InputOutput
3odd

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.

Solve


Flag

HTB{n0t_3v3n_cl0s3!}

Challenge Oddly Even de Hack The Box completado.