#C2233. Forming Teams
Forming Teams
Forming Teams
You are given two integers, \( n \) and \( k \). The integer \( n \) represents the total number of participants, while \( k \) represents the maximum number of participants that can form a complete team. Your task is to determine the maximum number of complete teams that can be formed and the number of participants that will be left without a team.
The solution is straightforward: a complete team can only be formed if there are at least \( k \) participants. Thus, the maximum number of teams is \( \lfloor n/k \rfloor \), and the leftovers are given by the remainder \( n \mod k \).
For example, if \( n = 20 \) and \( k = 5 \), then you can form 4 teams with no leftovers, because \( 20/5 = 4 \) exactly. Similarly, if \( n = 13 \) and \( k = 4 \), you can form 3 teams and have 1 participant remaining.
inputFormat
Input is given via standard input (stdin). It consists of a single line containing two space-separated integers ( n ) and ( k ), where ( n ) is the total number of participants and ( k ) is the maximum size of a team.
outputFormat
The program should print two integers separated by a space: the first integer is the maximum number of complete teams that can be formed, and the second integer is the number of leftover participants.## sample
20 5
4 0