Sagar's Learning
Practice
3.2 (30 votes)
Easy
Problem
72% Success 5539 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code
Sagar is good mathematician as well as CSE student and has learned few concepts such as HCF and LCM. Now, to test his learning , his room-mate Mohith gave him a number N and asked him to give biggest possible HCF that can be obtained by 3 numbers less than or equal to N (All 3 numbers need to be distinct).
Help Sagar to find the solution.
Constraints
1<=T<=10
1<=N<=10^18
Input
First line contains an integer T,denoting the number of testcases, Next T line follows number N.
Output
Output the answer in next line, if Multiple answer are possible then print the smallest three numbers in increasing order and if no solution, then print -1
Submissions
Please login to view your submissions
Similar Problems
Points:20
26 votes
Tags:
ApprovedData StructuresEasyImplementationapproved
Points:20
29 votes
Tags:
Ad-HocAlgorithmsBasic ProgrammingBasics of ImplementationEasyImplementation
Points:20
17 votes
Tags:
Basic ProgrammingBasics of ImplementationEasyImplementation
Editorial
No editorial available for this problem.