Advertisement
DerioFT

1071.py

Oct 3rd, 2021
720
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. X = int(input())
  2. Y = int(input())
  3.  
  4. total = 0
  5.  
  6. start = min(X,Y) + 1
  7. limit = max(X,Y)
  8.  
  9. if start % 2 == 0:
  10.     start += 1
  11.  
  12. for data in range(start, limit, 2):
  13.     total += data
  14.  
  15. print(total)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement