Digit Hackerearth

code: