Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n, d, t = map(int, input().split())
- p =[list(map(int, input().split())) for i in range(n)]
- c = 0
- i = 0
- r = []
- while c < t:
- r.append(c)
- c += d
- for j in p:
- if j[0] < c < j[1]:
- c = j[0]
- break
- r.append(t)
- print(len(r))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement