SMALL - Smallest Number
Your task is extremely simple, for a given number N you have to find the smallest number which is divisible by all numbers from 1 to N without leaving any remainder. As the number can be very large print the answer modulo 1000000007.
Input
Input starts with a positive integer T < 501 in a single line, then T lines follow. Each of the T lines contains one positive integer N < 10001.
Output
For every N print the desired number.
Example
Input: 1 5 Output: 60
hide comments
hanstan:
2016-03-15 10:33:05
AC 0.00s in one go! XD
|
|
kunal05:
2016-02-18 17:47:47
@Lakshman
|
|
dokz:
2016-01-21 06:31:40
Precalculate 10000 values using BigInteger, output with modulo => AC 0.55 :) Last edit: 2016-01-21 06:31:50 |
|
ompr7371:
2015-09-03 10:53:43
hii @lakshman can you go through my submission id too ..my id is 15053864.i am getting wrong answer..
|
|
h_a_k_r:
2015-08-23 07:54:48
@Lakshman can you pls check whats going wrong in this one 14958211
|
|
Krzysztof Strojny:
2015-08-21 14:05:21
Fasttest Java solution in first go :D Cool problem |
|
ompr7371:
2015-08-07 11:26:26
why i am getting TLE when my code runs in less than o(n^2)
|
|
Abhay Jain:
2015-08-05 15:07:20
Since my link has been removed, where can i post my source code for u guys to help me out?
|
|
Abhay Jain:
2015-08-05 10:08:02
Can anybody help me with my code. I just haven't programmed the end modulo part yet. So while going through test cases few of my outputs contained random negative integers. Here is the ideone link. http://ideone.com/*******SNIP********* The outputs of a few numbers like 299 and 10000 contain random negative numbers. If this is fixed I can add the end modulo part. Please help!!!! The outputs are big coz its without the modulo division Last edit: 2015-08-05 11:07:04 |
|
Arun:
2015-07-22 08:18:47
@[Lakshman]
|
Added by: | [Lakshman] |
Date: | 2015-01-24 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 JS-MONKEY |