SHARE
TWEET

Untitled

a guest Mar 20th, 2017 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a,b,c,d,e = raw_input().strip().split(' ')
  2. a,b,c,d,e = [int(a),int(b),int(c),int(d),int(e)]
  3.  
  4. numberlist = []
  5. numberlist.extend([a,b,c,d,e])
  6.  
  7. circularlist = []
  8. while len(circularlist) < 50:
  9.     circularlist.extend(numberlist)
  10.    
  11. iterator = 0
  12. summedlist = []
  13.  
  14. for number in range(len(circularlist)):
  15.     try:
  16.         summedlist.append(circularlist[iterator] + circularlist[iterator + 1] + circularlist[iterator + 2] + circularlist[iterator + 3])
  17.         iterator += 1
  18.     except:
  19.         break
  20.  
  21. print min(summedlist), max(summedlist)
RAW Paste Data
Top