We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

- All Contests
- ProjectEuler+
- Project Euler #12: Highly divisible triangular number

# Project Euler #12: Highly divisible triangular number

# Project Euler #12: Highly divisible triangular number

Contest ends in

_{This problem is a programming version of Problem 12 from projecteuler.net}

The sequence of triangle numbers is generated by adding the natural numbers. So the 'th triangle number would be . The first ten terms would be:

Let us list the factors of the first seven triangle numbers:

We can see that is the first triangle number to have over five divisors.

What is the value of the first triangle number to have over divisors?

**Input Format**

First line , the number of testcases. Each testcase consists of in one line.

**Constraints**

**Output Format**

For each testcase, print the required answer in one line.

**Sample Input**

```
4
1
2
3
4
```

**Sample Output**

```
3
6
6
28
```

**Explanation**

Explained in statement.