Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __author__ = 'spb'
- import sys
- sys.stdin = open('hall.in')
- sys.stdout = open('hall.out', 'w')
- a, b, c, d = map(int, input().split())
- res = 0
- for p in range(c, d + 1):
- if p % 2 == 1:
- continue
- else:
- q = p // 2
- i = q // 2
- j = q - i
- if i * j < a:
- continue
- else:
- while i * j > b and i > 0:
- i -= 1
- j += 1
- while i * j >= a and i > 0:
- i -= 1
- j += 1
- res += 1
- print(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement