Advertisement
PlotnikovPhilipp

Untitled

Oct 24th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. a, b, c, d = [int(i) for i in input().split()]
  3. h = 1 if c < d else -1
  4. print (( (a + 2 * b) * (d - c - 1) + 2 * b) * h)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement