Hackerearth: COUNT NUMBERS

code: