My issue
runtime error?
I’ve run it on my pc software, it works perfectly fine
codechef needs to understand that there are various methods to approach a problem, however you are restricting the thinking by limiting the memory space and displaying errors
all i want to say is, don’t just stick to one solution of yours and expect every coder to approach the same
My code
# cook your dish here
t=int(input())
for i in range(t):
l,r=map(int,input().split())
temp=[]
res=[]
for i in range(l,r+1):
temp.append(i)
for j in temp:
for i in range(l,r+1):
s=j+i
res.append(s)
a=list(set(res))
print(len(a))
Learning course: Level up from 1* to 2*
Problem Link: CodeChef: Practical coding for everyone