newton/solutions/boring_apartments.py

9 lines
178 B
Python
Raw Normal View History

2025-01-11 11:41:29 +00:00
t = int(input())
for _ in range(t):
resident = input()
pressed = 0
pressed += int((int(resident[0])-1)*10 + (len(resident)/2)*(len(resident)+1))
print(pressed)