vadim_sharaf

Untitled

Sep 21st, 2021
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. n, m, y, x = map(int, input().split())
  2. if y % 2 == 0:
  3.     print((y * m -1) - (x - 1))
  4. else:
  5.     print((y - 1)*m + (x-1))
Advertisement
Add Comment
Please, Sign In to add comment