Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open('27_1 — копия (5).txt','r')as f:
- lines = f.read().split('\n')
- n = int(lines[0])
- a = lines[1:]
- d = 160
- p = 7
- c = 0
- p1=0
- p2=0
- for i in range(0,n-1):
- for j in range(i+1,n):
- if (int(a[i]) % 160 != int(a[j]) % 160) and (int(a[i]) % 7 == 0 or int(a[j]) % 7 == 0) and (int(a[i])+int(a[j])) > c:
- c = int(a[i])+int(a[j])
- p1 = a[i]
- p2 = a[j]
- if p1==0 and p2 == 0:
- print(p1,p2)
- else:
- print(p1,p2)
RAW Paste Data