I believe I have a correct solution for problem FLOW004 on codechef. But I keep getting “wrong answer” when I try to submit. Please help.
Here is the link for the problem: FLOW004 Problem - CodeChef
My code(Python 3.6):
t=int(input())
for x in range(t):
a = int(input())
an=a%10
while(a>0):
a=a//10
if(a//10==0):
an+=a
print(an)