Here is the contest link.
A. The Ticket Booth
Simply put, the problem is asking us to represent $$$S$$$, as a summation of numbers from the set $$${1, 2, 3, … ,n }$$$.
Obviously there are many ways to do that, for example one might use $$$1$$$ $$$S$$$ times, but in this problem we are asked to use the minimum number of elements and output how many we used.
Since we have all the numbers from $$$1$$$ to $$$n$$$ and we can use each element repeatedly, we can afford to be greedy and always use the largest value less or equal to $$$S$$$, until we get the sum of the selected elements equal to $$$S$$$. This ensures that we use the fewest possible numbers.
This process can easily be represented by a ceil division of $$$S$$$ by $$$n$$$.
because $$$⌈S/n⌉$$$ tells us how many times we would need to add the largest possible number (which is $$$n$$$) to reach or exceed $$$S$$$.
Time complexity: $$$O(1)$$$. Space complexity: $$$O(1)$$$
n,S = map(int, input().split())
print((S + n - 1) // n)