the-job-party-1_28728
Raman got placed in AWS. He is organizing his job party in which N number of people are invited and only K people joined the party.

Ofcourse, Raman is also present in the party!

K ≤ N

In the party everyone starts shaking hands with everyone else. Given, any two persons shake hand exactly once.

Can you tell the total number of handshakes ? 

Input Format

The first line contains the number of test-cases T, T lines follow.

Each line then contains integer N (the total number of invites sent by Raman) and space separated integer K (the total number of people joined the party)

Output Format

Print the number of handshakes for each test-case in a new line

Constraints

1 ≤ T ≤ 1000

0 < K ≤ N < 10^6

SAMPLE INPUT
2
1 1
3 2

SAMPLE OUTPUT
1
3

Explanation

Case 1 : Only one person comes to the party. That is one handshake.
Case 2 : Two people come to the party. Therefore total handshakes equals 3
t=input()
while t>0:
	t-=1
	n, k=raw_input().split(" ")
	n, k=int(n), int(k)
	
	print (k*(k+1))/2
2
1 1
3 2

SAMPLE 2
1 1
3 2

SANPLE 2
1 2
3 2

SANPLE 2
1 2
3 4

SANPLE 2
1 4
3 4

SANPLE 2
1 7
6 4

SANPLE 2
1 7
6 3

SANQLE 2
1 8
6 3

SANQLE 2
1 7
7 6

SANQLE 2
1 0
7 6

SANQKE 2
1 1
7 6

SAEQKN 2
0 1
7 3

SAEQKN 2
0 0
7 3

NKQEAS 2
1 -4
2 3

OKQEAS 2
1 -4
2 6

OKQEAS 2
2 -4
2 10

QKOEAS 2
2 -4
2 0

QKOEAS 2
4 -4
2 1

QKOEAS 2
4 -1
2 1

QKOEAS 2
4 -1
2 0

QKOEAS 2
-1 -2
0 -1

QKOD@S 2
-1 -2
0 -2

QKOD@S 2
-2 -5
1 -2

SPD@KS 2
-2 -5
1 -1

SPD@KS 2
-2 -9
1 -2

SPD@KS 2
-2 -7
1 -2

SPD@KS 2
-2 -7
1 0

SPD@KS 2
-1 -6
0 1

SPD@KT 2
-2 -11
0 1

PK@DTS 2
-2 -11
0 0

PK@DSS 2
-1 -10
1 -1

SSDP?K 2
-1 -8
0 -1

?DSPSK 2
-1 -14
0 -1

?DRPSK 2
-1 -14
0 -2

?DRPSK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1 0

UWK=RF 2
-2 23
1 0

UXK=RF 2
-3 41
0 0

UXK=RG 2
-3 27
0 0

UXK=RG 2
-3 32
0 0

UWK=RG 2
-1 1
0 -11

Y=RUJH 2
-1 2
0 -11

Y=RUJH 2
-1 1
0 -14

Y=RUJH 2
0 0
-1 -14

Y=RUJH 2
1 4
6 4

SANPLE 2
1 7
6 4

SANQLE 2
1 7
7 3

SANQLE 2
1 7
7 6

SANQKE 2
1 0
7 6

SAEQKN
1
3
 1
3
 3
3
 3
10
 10
10
 28
10
 28
6
 36
6
 28
21
 0
21
 1
21
 1
6
 0
6
 6
6
 6
21
 6
55
 6
0
 6
1
 0
1
 0
0
 1
0
 1
1
 10
1
 10
0
 36
1
 21
1
 21
0
 15
1
 55
1
 55
0
 45
0
 28
0
 91
0
 91
1
 91
3
 0
3
 0
10
 3
0
 3
1
 3
6
 6
28
 15
0
 6
3
 15
3
 21
3
 21
10
 21
15
 1
15
 6
15
 21
6
 21
21
 15
21
 3
21
 15
45
 15
55
 10
55
 10
6
 1
28
 1
105
 6
105
 6
276
 6
78
 15
78
 66
78
 0
78
 0
253
 0
465
 0
136
 0
66
 1
66
 3
66
 3
91
 10
3
 15
6
 66
6
 253
6
 253
15
 630
15
 0
15
 6
10
 1
10
 6
36
 0
28
 36
0
 28
1
 45
1
 78
1
 78
0
 276
0
 861
0
 378
0
 528
0
 1
55
 3
55
 1
91
 0
91
 10
10
 28
10
 28
6
 28
21
 0
21
