Codechef Solution

Hello Coders

So am back with some new idea of learning algorithm and data structure.
As most of the people who are not aware of codechef. Here the programmers can showcase there skills an earn codechef certification and they can also learn new algorithms. we will try to solve the practice problems in codechef using python programming

So lets get started!!!!

Problem code:Flow001(Add Two Numbers)

Solution:-


T = int(input())
for tc in range(T):
# Read integers a and b.
(a, b) = map(int, input().split(' '))

ans = a + b
print(ans)

Problem code:TSORT(Add Two Numbers)

Solution:-


arr=[]
t=int(input())
for i in range(0,t):
n=int(input())
arr.append(n)
arr.sort()
for i in arr:
print (i)

Problem code:CEQUAL(Add Two Numbers)

Solution:-


t=int(input())
while(t>0):
n=int(input())

num=list(map(int,input().split()))
count=0
for i in range(n):
for j in range(i+1,n):
if(num[i]==num[j]):
count+=1
if(count>0):
print('Yes')
else:
print('No')

t=t-1