HackwithInfy/Advantage Round Previous Year Questions( Questions, Notes of Some Subjects) Complete For Upcoming Hackwithinfy Exam
HackwithInfy/Advantage Round Previous Year Questions( Questions, Notes of Some Subjects) Complete For Upcoming Hackwithinfy Exam
- Get link
- X
- Other Apps
3rd question
ReplyDeletem,n=input().split(':')
x=sum(list(map(lambda x: x**2,list(map(int,list(n))))))
if x%2==0:
print(m[len(m)-1]+m[:len(m)-1])
else:
print(m[2:]+m[:2])
a=list(map(int,input().split(',')))
ReplyDeletek=[[j] for i in a for j in range(1,(i//2)+1) if i%j==0]
j=[sum([j for j in range(1,(i//2)+2) if i%j==0]) for i in a]
for i in range(len(a)):
if j[i]==a[i]:
print(j[i])
else:
j[i]=0
if sum(j)==0:
print('-1')
java solution please
ReplyDelete