e: 王子救公主
Time Limit: 1 Sec Memory Limit: 128 MBDescription
公主被巫婆抓走,王子为拯救公主需要过n个关,第一关有m个敌人,除第一关每一关都比前一关多d个敌人,王子想知道要打败多少个敌人才可以拯救公主。
Input
第一行1个整数T,表示有T组。(T<=10)
每组测试数据一行三个正整数 n,m,d。(n,m,d<=1000)
Output
每组输出王子要打败的敌人数,每组占一行。
Sample Input
1 3 1 1
Sample Output
6
不要问,问就是等差数列求和。