SHARE
TWEET

Untitled

a guest Apr 18th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a=[0,0,0,0,0]
  2. minSum=minn=10001
  3. N=int(input())
  4. for i in range (5):
  5.     a[i]=int(input())
  6. for i in range (N-5):
  7.     if (a[0]<minn):
  8.         minn=a[0]
  9.     elem=int(input())
  10.     if((elem**2+minn**2)<minSum):
  11.         minSum=elem**2+minn**2
  12.     for j in range (4):
  13.         a[j]=a[j+1]
  14.     a[4]=elem
  15. print (minSum)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top