FJUT突然要居然一个比赛,现在有n个人,他们组成了m个队伍,每个队伍内至少有一个人
每个队伍内的两两可称为朋友,问至少有多少对朋友,至多有多少对朋友
单组数据。
输入两个数字,n,m(1 ≤ m ≤ n ≤ 109),代表有多少个人,多少组队伍
输出两个数组kmin 和kmax,代表至少有多少对朋友,至多有多少对朋友
5 1
10 10
3 2
1 1
6 3
3 6
NoteIn the first sample all the participants get into one team, so there will be exactly ten pairs of friends.
In the second sample at any possible arrangement one team will always have two participants and the other team will always have one participant. Thus, the number of pairs of friends will always be equal to one.
In the third sample minimum number of newly formed friendships can be achieved if participants were split on teams consisting of 2 people, maximum number can be achieved if participants were split on teams of 1, 1 and 4 people.