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 #221: Alexandrian Integers
Project Euler #221: Alexandrian Integers
Project Euler #221: Alexandrian Integers
Contest ends in
This problem is a programming version of Problem 221 from projecteuler.net
We shall call a positive integer an "Alexandrian integer", if there exist integers , , such that:
and
For example, is an Alexandrian integer (, , ). In fact, is the Alexandrian integer, the first Alexandrian integers being: , , , , and .
Find the Alexandrian integer.
Input Format
First line of each test file contains a single integer that is the number of queries per test file. lines follow, each with an integer .
Constraints
Output Format
Print exactly lines with an answer to the corresponding test on each.
Sample Input 0
6
1
2
3
4
5
6
Sample Output 0
6
42
120
156
420
630