Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. from sys import stdin, stdout
  2. ins = stdin
  3. outs = stdout
  4. a = list(map(int, ins.readline().split()))
  5. print(a)
  6. a += [a[-1]]
  7. ans = [0, 0]
  8. state = 0
  9. pos = 0
  10. for i in range(len(a) - 1):
  11.     if a[i] < a[i + 1]:
  12.         pos = i
  13.     if a[i] > a[i + 1]:
  14.         ans = pos + 1, i + 1
  15. if ans[1] - ans[0] != 0:
  16.     print(ans)
  17. else:
  18.     print(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement