HACK - A little hacking
Chief, your situation is miserable in Calculus. You know that if some miracle doesn't happen, you are going to spend the next summer here. Obviously, you don't want to do that. So, you hatch a plan to hack into your instructor's computer system and obtain the exam paper. Given that you are good at hacking, you manage to obtain the exam paper but unfortunately, the text is encrypted. All is not lost yet! You see some numbers written on the paper. Quickly, you figure out that the key to decrypt the text is the lowest common multiple of the given numbers(mod 10007).
Input
The input consists of multiple lines. Each line consists of a number n(1 <= n <= 10^4). End of input is marked by 0.
Output
Output a single number which is the L.C.M. of the input numbers modulo 10007.
Example
Input:
2
3
4
0
Output:
12
Please note that zero is just an indicator for the end of input. It is guaranted that the input will have atleast two lines.
hide comments
|
sorbilig1234:
2019-12-14 06:03:08
lol |
|
Mitch Schwartz:
2014-01-17 07:48:23
Ok, problem hidden. Although Walrus could have worded his comment more carefully with regard to weak test data versus wrong test data. It's the difference between wrong code getting AC and correct code getting WA. (They are not equivalent.) |
|
leafmoon:
2014-01-17 07:27:56
Perhaps this should be hidden?? |
|
G_life:
2011-09-16 07:13:52
@utkarsh lath..
|
|
Walrus:
2011-03-26 09:10:38
Actually, this problem is wrong :(
|
|
M. Zuhriyan Sauqi:
2011-03-25 03:30:03
@raja no need |
|
Kousthub Raja:
2010-10-30 13:43:48
Increase the time limit to 3s.It would be better. :) |
Added by: | Siddharth Kothari |
Date: | 2010-09-26 |
Time limit: | 0.306s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 NODEJS OBJC VB.NET |
Resource: | Own problem |