题库练习 Contest Start
← 上一题 下一题 →

A14278 | Contest Start

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

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
C++ 编辑器
输入
输出