Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. list=input()
  2. max=max2=list[0]
  3. for i in list:
  4.   if i>max:
  5.     max2=max
  6.     max=i
  7.   elif i>max2 and i!=max or max==max2:
  8.     max2=i
  9.  
  10. if max==max2:
  11.   print 'NO'
  12. else:
  13.   print max2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement