Number of students
Number of teams
Grabs the two numbers you typed in - the total number of students, and how many teams you want to split them into.
Say you've got 23 students and want 5 teams. 23 ÷ 5 = 4.6 - but you can't have 0.6 of a person on a team. Math.floor() rounds that down to 4, which becomes our "small" team size. But 5 teams × 4 students = only 20 - there are 3 students left over. Those 3 need a home too, so they each get folded into a team that's one bigger (largeTeamSize, which is just smallTeamSize + 1). The remainder operator (%) tells us exactly how many students are left over - and that's also exactly how many "large" teams we need, since each large team absorbs one extra student. Whatever teams are left (teams - largeTeams) stay at the smaller size.
Stitches all four numbers into a plain-English sentence and displays it. For the 23-students-into-5-teams example: "3 teams with 5 students and 2 teams with 4 students" - and sure enough, 3×5 + 2×4 = 23. Nobody's left out, and every team is as close to even as the numbers allow.