Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n= int(input())
- max2=-1
- max13=-1
- max26=-1
- pos=0
- pos2=0
- pos3=0
- maxx=-1
- maxy=-1
- for i in range(0,n):
- h=int(input())
- if h%26==0:
- if h>max26:
- max26=h
- pos=i
- elif h%13:
- if h>max13:
- max13=h
- elif h%2:
- if h>max2:
- max2=h
- if h>maxx:
- maxy=maxx
- pos2=i
- else:
- if h>maxy
- pos3=i
- maxy=h
- if max26!=-1 and pos!=pos2:
- print(max26*maxx)
- elif max26!=-1 and pos!=pos3:
- print(max26*maxy)
- elif max13!=-1 and max2!=-1
- print(max13*max2)
- else:
- print(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement