1st Tuenti Programming Contest

Tuenti Programming Contest Contest Questions Stats      

Challenge 6: The clock « Prev Next »

Completion time: 10 percentile: 0.56 h
Average: 5.81 h
90 percentile: 16.97 h
# of completions:260

You have a digital, 7 led segment, clock. One day, while waking up from a sci-fi dream, you wonder: how many times will the individual leds turn on after X seconds, from a 00:00:00 position?

Yeah, geeks. But as a good geek you will not that question stay on your mind forever, right? ;)

Take into account that every second, all leds turn off and then the ones for the next position will turn on.

Sample input


Sample output


Follow Tuenti Engineering on Twitter! Share Tuenti Programming Contest in Tuenti!