← Back to List

8794번: Poniedziałki ↗

Solutions

Python 3
139 B | 139 chars
for _ in range(int(input())):
	n, m, l = map(int, input().split())
	
	z = n - (m - l + 1) if l !=1 else n
	
	print(z // m + int(z % m > 0))