URI Online Judge | 1168
LED
John wants to set up a panel containing different numbers of LEDs. He does not have many leds, he is not sure if he will be able to mount the desired number. Considering the configuration of the LEDs of the numbers below, make an algorithm that helps John to discover the number of LEDs needed to set the value.

Input
The input contains an integer N, (1 ≤ N ≤ 2000) corresponding to the number of test cases, followed by N lines, each line containing a number (1 ≤ V ≤ 10100) corresponding to the value that John wants to set with the leds.
Output
For each test case, print one line containing the number of LEDs that John needs to set the desired value, followed by the word "leds".
| Input Sample | Output Sample |
| 3 115380 2819311 23456 | 27 leds 29 leds 25 leds |
[WAIT]
First of all, think yourself that you have tried enough for the problem. If you did not please read the program once. REMEMBER one thing, just believe in yourself.....YOU CAN.....YOU KNOW....
See the ANSWER here...
No comments:
Post a Comment