t=int(input())
righthand=['k','j']
lefthand=['d','f']
while t>0:
t=t-1
c= input()
count=0.2
n=int(input())
for r in range (0,len(c)-1):
if c[r] in righthand:
afterletter=righthand
if c[r] in lefthand:
afterletter=lefthand
while n>1:
n=n-1
beforeletter=afterletter
if c[r] in righthand:sds
afterletter=righthand
if c[r]in lefthand:
afterletter=lefthand
if afterletter==beforeletter:
count=count+0.4
if afterletter!=beforeletter:
count=count+0.2
print(count)
lỗi
Traceback (most recent call last):
File "python", line 6
c= input()
^
IndentationError: unindent does not match any outer indentation level
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?