Submit | All submissions | Best solutions | Back to list |
KIMO2 - simple calculation |
The problem statement is very, easy just compute the value of x given the value of n.
Input
The first line will contains T the number of test cases, the following T lines will contain the value of n.
1 <= T <= 10^5
1 <= n < 10^7
Output
For every n print the value of x % (10^9 + 7).
Example
Input: 5 1 5 10 15 33 Output: 1 80 5120 245760 733919781
Added by: | abdelkarim |
Date: | 2013-05-17 |
Time limit: | 2s |
Source limit: | 5000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | owner |
hide comments
|
|||||
2016-04-21 19:26:45
peace of cauchen :D |
|||||
2015-03-24 09:52:03 Hussein Aassem
the formula of the output needs a pair of parentheses for clarity x % (10^9+7) |
|||||
2013-08-18 09:31:47 aqfaridi
expo.. |
|||||
2013-05-23 17:02:40 Ouditchya Sinha
Piece of Cake. AC in 0.13s :) |
|||||
2013-05-18 16:12:19 Rajarshi Sarkar
@Lakshman >> Mayb an overflow ;) Nice problem, reminds me of my high school days :) |
|||||
2013-05-18 15:55:16 [Lakshman]
@abdelkarim can you please tell me why WA..this is simple and on direct formula My mistake...got it AC...Good for beginners.....Silly mistake cause 7 WA... Thanks..@Rajarshi Sarkar Last edit: 2013-05-18 16:20:17 |
|||||
2013-05-18 12:41:53 [Lakshman]
I think this is on direct formula..******** am I wrong..? Ans(Tjandra): Yes, it's correct. But, please don't spoil the formula ;-) Last edit: 2013-05-18 12:50:49 |
|||||
2013-05-17 20:04:37 (Tjandra Satria Gunawan)(曾毅昆)
AC with less than 123B in C without any opti.. But maybe impossible to pass with slow language.. Last edit: 2013-05-17 18:37:40 |