Skip to content

Instantly share code, notes, and snippets.

@washingtonsoares
Created May 11, 2022 09:13
Show Gist options
  • Save washingtonsoares/c499a18094c3250dbb76b965d24544f7 to your computer and use it in GitHub Desktop.
Save washingtonsoares/c499a18094c3250dbb76b965d24544f7 to your computer and use it in GitHub Desktop.
# https://www.beecrowd.com.br/judge/pt/problems/view/1168
n = int(input())
ledsByValue = {
"0": 6,
"1": 2,
"2": 5,
"3": 5,
"4": 4,
"5": 5,
"6": 6,
"7": 3,
"8": 7,
"9": 6,
}
for _ in range(n):
value = input()
sum = 0
for number in value:
leds = ledsByValue[number]
sum += leds
print(str(sum) + " leds")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment