Lab Test Obstacle

0

0 votes
Problem

Rivu loves to teach students but often he looses his temper. One day he was angry with his students as they were not able to answer his questions in the class. So, he decided to set tough questions for their next Lab Test. He will give you a number N and you have to find the LCM of all the numbers from 1 to N.

Least Common Multiple(LCM) of two numbers is the smallest positive integer that is divisible by both the numbers. For eg:- LCM(5,10)=10.

Input:
The first line of input contains an integer T indicating the number of test cases. For each test case: There is an integer N.
( 1 <= N <= 10^6 )
( 1 <= T <= 100)

Output:
A single integer i.e. the LCM of all numbers from 1 to N. Since the output can be very large, print it modulo 1000000007.


Problem Setter: Rivu Das

Time Limit: 3
Memory Limit: 256
Source Limit:
Editor Image

?