CF1539A Contest Start
题目描述
### 题意描述
有 $n$ 个人参加某个竞赛,他们以 $x$ 分钟的间隔开始。
每个参赛者的比赛时长为 $t$ 分钟,因此第一个参赛者在 $t$ 时间结束比赛,第二个参赛者在 $t+x$ 时间结束比赛,依此类推。当一个参赛者完成比赛时,他们的不满意程度等于已开始比赛(或现在正好开始)但还没有完成比赛的参赛者人数。
求所有参赛者的不满意程度之和。
输入格式
第一行包含一个整数 $k$ ( $1\leq k\leq 1000$),表示数据组数。
接下来的每一行包含三个整数 $ n,x,t$ ( $1\leq n,x,t\leq 2⋅10^9$),分别为参与者的数量,开始时间间隔和比赛时长。
输出格式
一共 $k$ 行,在第 $i$ 行中输出第 $i$ 组数据中参与者的不满意程度之和。
说明/提示
In the first example the first participant starts at $ 0 $ and finishes at time $ 5 $ . By that time the second and the third participants start, so the dissatisfaction of the first participant is $ 2 $ .
The second participant starts at time $ 2 $ and finishes at time $ 7 $ . By that time the third the fourth participants start, so the dissatisfaction of the second participant is $ 2 $ .
The third participant starts at $ 4 $ and finishes at $ 9 $ . By that time the fourth participant starts, so the dissatisfaction of the third participant is $ 1 $ .
The fourth participant starts at $ 6 $ and finishes at $ 11 $ . By time $ 11 $ everyone finishes the contest, so the dissatisfaction of the fourth participant is $ 0 $ .
In the second example the first participant starts at $ 0 $ and finishes at time $ 2 $ . By that time the second participants starts, and the third starts at exactly time $ 2 $ . So the dissatisfaction of the first participant is $ 2 $ .
The second participant starts at time $ 1 $ and finishes at time $ 3 $ . At that time the third participant is solving the contest.