Can someone tell me what is wrong in this code?

Problem Code: FLOW004

t = int(input("enter the testcase "))

first = 0

last = 0

for i in range(t) :

n = int(input())

last = n % 10

while n>=10 :

    n = n/10

first = int(n)

print(first+last)

Is is working perfectly in vs code but showing error in codechef

what error ? can you share the link of your code ?

how to share that

https://www.codechef.com/viewsolution/51668520

Remove the string ‘enter the testcase’, then the code should work fine.

1 Like

do what prax said , make

t = int(input())

from

t = int(input("enter the testcase "))
1 Like

thanks:)

thanks:) but can u plzz tell me why we did it…

Because it is not asked in problem to do so , you just have to take input without printing anything while taking input .

1 Like