There are N people P1, P2, P3, …, PN having F1, F2, F3, …, FN Facebook friends, respectively. The solution to this problem is finding k = Fi%Fj such that it is maximum over all valid i,j. Constraints: 2 <= N <= 105 1 <= Ai <= 109 for each i Input Format: The first line contains an integer N
Answers
Answered by
0
Answer:
Subscribe to my YouTube channel shashi Gamer
Explanation:
Answered by
0
Answer:
n=int(input())
l=list(map(int,input().split()))
a=max(l)
l.remove(a)
b=max(l)
print(b,end='')
Similar questions