308561: CF1539A. Contest Start
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
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$ 组数据中参与者的不满意程度之和。题目描述
There are $ n $ people participating in some contest, they start participating in $ x $ minutes intervals. That means the first participant starts at time $ 0 $ , the second participant starts at time $ x $ , the third — at time $ 2 \cdot x $ , and so on. Duration of contest is $ t $ minutes for each participant, so the first participant finishes the contest at time $ t $ , the second — at time $ t + x $ , and so on. When a participant finishes the contest, their dissatisfaction equals to the number of participants that started the contest (or starting it now), but haven't yet finished it. Determine the sum of dissatisfaction of all participants.输入输出格式
输入格式
The first line contains a single integer $ k $ ( $ 1 \le k \le 1000 $ ) — the number of test cases. Each of the next $ k $ lines contains three integers $ n $ , $ x $ , $ t $ ( $ 1 \le n, x, t \le 2 \cdot 10^9 $ ) — the number of participants, the start interval and the contest duration.
输出格式
Print $ k $ lines, in the $ i $ -th line print the total dissatisfaction of participants in the $ i $ -th test case.
输入输出样例
输入样例 #1
4
4 2 5
3 1 2
3 3 10
2000000000 1 2000000000
输出样例 #1
5
3
3
1999999999000000000