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.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. All Contests
  2. ProjectEuler+
  3. Project Euler #12: Highly divisible triangular number

Project Euler #12: Highly divisible triangular number

Problem
Submissions
Leaderboard
Discussions

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.

Author

shashank21j

Difficulty

Easy

Max Score

100

Submitted By

11346

Need Help?


View discussions
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits

Choose a translation


  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy