11 lines
163 B
Python
11 lines
163 B
Python
n = int(input())
|
|
total = 0
|
|
for i in range(n):
|
|
j = input()
|
|
number = int(j[:-1])
|
|
power = int(j[-1])
|
|
total = total + number**power
|
|
|
|
print(total)
|
|
|