Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- f = open('input.txt', 'r')
- o = open('output.txt', 'w')
- with f,o:
- prevnum = int(f.readline().strip())
- m = 1
- j = 1
- while(1):
- s = f.readline().strip()
- if not s:
- o.write("%s\n" % str(m))
- break
- num = int(s)
- if num < prevnum:
- j += 1
- elif j > m:
- m = j
- j = 1
- prevnum = num
Add Comment
Please, Sign In to add comment