Calculate the sum of all the multiples of 3 or 7 below the natural number N.
First line contains T that denotes the number of test cases. For each test case there will be single line which contains an integer N.
For each test case, print an integer that denotes the sum of all the multiples of 3 or 7 below N.
1 ≤ T ≤ 50
1 ≤ N ≤ 1000000
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.