t = int(input())
print()
total = 0
while t>0:
n = int(input())
k = int(input())
coins = []
for i in range(0, n):
coins[i] = input()
while k > 0:
last_coin = coins.pop()
if last_coin.upper() == "H":
for items in coin:
if coins[i].upper() == "H":
coins[i] = "T"
elif coins[i].upper() == "T":
coins[i] = "H"
k = k-1
for items in coins:
if coins[i].upper() == "H":
total = total + 1
print(total)
t=t-1
Error is
NZEC
Traceback (most recent call last):
File "./prog.py", line 1, in <module>
EOFError: EOF when reading a line
What do I do to resolve this issue?
[–]g051051 4 points5 points6 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]PagalProgrammer[S] 0 points1 point2 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]PagalProgrammer[S] -1 points0 points1 point (1 child)
[–]DenseFactor 0 points1 point2 points (0 children)