Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def w():
- c = int(input())
- q = int(input())
- n = int(input())
- v = 0
- p = 0
- while p < c:
- p += 1
- v += 1
- if n - p < n // (q + 1):
- while p != n:
- v += 1
- p += 1
- else:
- p -= c
- while p != n:
- v += 1
- p = p + q + 1
- print(v)
- w()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement