# WA in SWPDGT

Https://www.codechef.com/viewsolution/30842062
It’s my solution link for SWPDGT
can someone tell me the mistake with my code…
Really can’t understand my mistake now also…will be thankful to you for my help with the mistake,

What if len(t) = 2 and len(l) = 1?

not possible, t >= l

https://www.codechef.com/viewsolution/30842723
len(t) == len(l) == 2
consider all the case, your code were not considering the all the cases

1 Like

it will never happen as l is for maximum and t is for minimum

This is my code, I am getting the wrong answer in this but when I ran @ajaymalik code and compared the output they are same. I think I am missing a testcase can you help me.
I know this is an inappropriate way to code but can you help!!

t=int(input())
for z in range(t):
n,m=input().split()
n=int(n)
m=int(m)
sum=n+m
L=*2
M=*2
L=n//10
L=n%10
M=m//10
M=m%10
if(L==0 and M==0):
print(sum)

``````if(L==0 and M!=0):
if(L > M):
temp=L
L=M
M=temp
sum2=L+(10*M+M)
print(max(sum,sum2))

if(M==0 and L!=0):
if(M > L):
temp=M
M=L
L=temp
sum2=M+(10*L+L)
print(max(sum,sum2))

if(L!=0 and M!=0):
L.sort()
M.sort()
if(L[-1]<M[-1]):
temp=L
L=M[-1]
M[-1]=temp
num1=10*L+L
num2=10*M+M
sum2=num1+num2
print(max(sum,sum2))

else:
temp=M
M=L[-1]
L[-1]=temp
num1=10*L+L
num2=10*M+M
sum2=num1+num2
print(max(sum,sum2))``````

Thank you sir
i got it i am missing the test case second digit of min > first digit of max

L.sort()
M.sort()
this the error i guess

thanks, I will check

Try
1
17 23