Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
1097
|
Hello 2019 |
FINISHED |
False |
10800 |
185210099 |
Jan. 4, 2019, 2:45 p.m. |
Problems
B'Makoto has a big blackboard with a positive integer n written on it. He will perform the following action exactly k times: Suppose the number currently written on the blackboard is v . He will randomly pick one of the divisors of v (possibly 1 and v ) and replace v with this divisor. As Makoto uses his famous random number generator (RNG) and as he always uses 58 as his generator seed, each divisor is guaranteed to be chosen with equal probability. He now wonders what is the expected value of the number written on the blackboard after k steps. It can be shown that this value can be represented as frac{P}{Q} where P and Q are coprime integers and Q not equiv 0 pmod{10^9+7} . Print the value of P cdot Q^{-1} modulo 10^9+7 . The only line of the input contains two integers n and k ( 1 <= q n <= q 10^{15} , 1 <= q k <= q 10^4 ). Print a single integer -- the expected value of the number on the blackboard after k steps as P cdot Q^{-1} pmod{10^9+7} for P , Q defined above. In the first example, after one step, the number written on the blackboard is 1 , 2 , 3 or 6 -- each occurring with equal probability. Hence, the answer is frac{1+2+3+6}{4}=3 . In the second example, the answer is equal to 1 cdot frac{9}{16}+2 cdot frac{3}{16}+3 cdot frac{3}{16}+6 cdot frac{1}{16}= frac{15}{8} . '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
53217075 |
sansen |
D |
April 24, 2019, 9:29 a.m. |
OK |
GNU C11 |
TESTS |
44 |
202 |
0 |
|
2200 |
48277674 |
sansen |
D |
Jan. 12, 2019, 6:34 a.m. |
OK |
GNU C11 |
TESTS |
44 |
951 |
1740800 |
|
2200 |
48273063 |
mrsrz |
D |
Jan. 12, 2019, 3:53 a.m. |
OK |
GNU C++11 |
TESTS |
44 |
46 |
0 |
|
2200 |
48020431 |
ouuan |
D |
Jan. 6, 2019, 5:06 a.m. |
OK |
GNU C++11 |
TESTS |
44 |
62 |
0 |
|
2200 |
48020344 |
ouuan |
D |
Jan. 6, 2019, 5:02 a.m. |
OK |
GNU C++11 |
TESTS |
44 |
78 |
0 |
|
2200 |
49610744 |
wwdd |
D |
Feb. 8, 2019, 12:09 a.m. |
OK |
GNU C++11 |
TESTS |
44 |
78 |
307200 |
|
2200 |
48020462 |
ouuan |
D |
Jan. 6, 2019, 5:08 a.m. |
OK |
GNU C++11 |
TESTS |
44 |
93 |
0 |
|
2200 |
47934791 |
DSG213 |
D |
Jan. 4, 2019, 4:31 p.m. |
OK |
GNU C++11 |
TESTS |
44 |
93 |
6144000 |
|
2200 |
48030488 |
EnjoyCallen |
D |
Jan. 6, 2019, 12:04 p.m. |
OK |
GNU C++11 |
TESTS |
44 |
109 |
204800 |
|
2200 |
49655632 |
nh_dantz |
D |
Feb. 9, 2019, 9:46 a.m. |
OK |
GNU C++11 |
TESTS |
44 |
109 |
4198400 |
|
2200 |
48223111 |
Coroian_David |
D |
Jan. 11, 2019, 2:52 p.m. |
OK |
GNU C++11 |
TESTS |
44 |
109 |
11264000 |
|
2200 |
47932135 |
AH_ljq |
D |
Jan. 4, 2019, 4:13 p.m. |
OK |
GNU C++11 |
TESTS |
44 |
124 |
5017600 |
|
2200 |
47932272 |
evilbuggy |
D |
Jan. 4, 2019, 4:14 p.m. |
OK |
GNU C++14 |
TESTS |
44 |
46 |
102400 |
|
2200 |
47956404 |
HanTroid |
D |
Jan. 5, 2019, 6:27 a.m. |
OK |
GNU C++14 |
TESTS |
44 |
93 |
9113600 |
|
2200 |
47939073 |
wmsy |
D |
Jan. 4, 2019, 5:05 p.m. |
OK |
GNU C++14 |
TESTS |
44 |
108 |
204800 |
|
2200 |
48262528 |
shivansh5 |
D |
Jan. 11, 2019, 6:22 p.m. |
OK |
GNU C++14 |
TESTS |
44 |
108 |
8396800 |
|
2200 |
47956507 |
HanTroid |
D |
Jan. 5, 2019, 6:32 a.m. |
OK |
GNU C++14 |
TESTS |
44 |
109 |
9113600 |
|
2200 |
47930848 |
SuperSodaSea |
D |
Jan. 4, 2019, 4:06 p.m. |
OK |
GNU C++14 |
TESTS |
44 |
124 |
204800 |
|
2200 |
61180475 |
sabertooth |
D |
Sept. 23, 2019, 7:37 p.m. |
OK |
GNU C++14 |
TESTS |
44 |
124 |
5734400 |
|
2200 |
47956254 |
HanTroid |
D |
Jan. 5, 2019, 6:21 a.m. |
OK |
GNU C++14 |
TESTS |
44 |
124 |
7987200 |
|
2200 |
47950391 |
LiM_256 |
D |
Jan. 4, 2019, 11:52 p.m. |
OK |
GNU C++14 |
TESTS |
44 |
139 |
5632000 |
|
2200 |
48097208 |
bear_grylls |
D |
Jan. 8, 2019, 5:39 p.m. |
OK |
GNU C++14 |
TESTS |
44 |
171 |
0 |
|
2200 |
47953512 |
Xiejiadong |
D |
Jan. 5, 2019, 3:57 a.m. |
OK |
GNU C++17 |
TESTS |
44 |
30 |
10547200 |
|
2200 |
48654381 |
ReaLNero1 |
D |
Jan. 21, 2019, 1:31 a.m. |
OK |
GNU C++17 |
TESTS |
44 |
31 |
307200 |
|
2200 |
47929948 |
niike0goood |
D |
Jan. 4, 2019, 4:01 p.m. |
OK |
GNU C++17 |
TESTS |
44 |
31 |
16486400 |
|
2200 |
48213738 |
0w1 |
D |
Jan. 11, 2019, 1:30 p.m. |
OK |
GNU C++17 |
TESTS |
44 |
46 |
409600 |
|
2200 |
55856580 |
chongryong |
D |
June 21, 2019, 7:17 a.m. |
OK |
GNU C++17 |
TESTS |
44 |
46 |
28876800 |
|
2200 |
47930283 |
anpans |
D |
Jan. 4, 2019, 4:03 p.m. |
OK |
GNU C++17 |
TESTS |
44 |
109 |
5120000 |
|
2200 |
47931251 |
arknave |
D |
Jan. 4, 2019, 4:08 p.m. |
OK |
GNU C++17 |
TESTS |
44 |
124 |
4300800 |
|
2200 |
47953949 |
alaneos777 |
D |
Jan. 5, 2019, 4:26 a.m. |
OK |
GNU C++17 |
TESTS |
44 |
124 |
5836800 |
|
2200 |
48170057 |
AtillaAk |
D |
Jan. 10, 2019, 6:12 a.m. |
OK |
GNU C++17 |
TESTS |
44 |
124 |
24268800 |
|
2200 |
47944518 |
vhnvn |
D |
Jan. 4, 2019, 6:52 p.m. |
OK |
GNU C++17 |
TESTS |
44 |
139 |
1536000 |
|
2200 |
47958003 |
hicodeworld |
D |
Jan. 5, 2019, 7:36 a.m. |
OK |
Go |
TESTS |
44 |
624 |
17817600 |
|
2200 |
68098291 |
MaxHeap |
D |
Jan. 2, 2020, 11:02 p.m. |
OK |
Java 11 |
TESTS |
44 |
607 |
0 |
|
2200 |
47941447 |
mikit |
D |
Jan. 4, 2019, 5:26 p.m. |
OK |
Java 8 |
TESTS |
44 |
311 |
0 |
|
2200 |
47937107 |
kessido |
D |
Jan. 4, 2019, 4:49 p.m. |
OK |
Java 8 |
TESTS |
44 |
327 |
0 |
|
2200 |
48080609 |
afrizal |
D |
Jan. 8, 2019, 7:32 a.m. |
OK |
Java 8 |
TESTS |
44 |
405 |
0 |
|
2200 |
52496953 |
Morgan_Y |
D |
April 8, 2019, 2:09 p.m. |
OK |
Java 8 |
TESTS |
44 |
420 |
0 |
|
2200 |
48057157 |
polyakoff |
D |
Jan. 7, 2019, 12:57 p.m. |
OK |
Java 8 |
TESTS |
44 |
420 |
0 |
|
2200 |
47956012 |
xodiac |
D |
Jan. 5, 2019, 6:11 a.m. |
OK |
Java 8 |
TESTS |
44 |
420 |
0 |
|
2200 |
65539248 |
dalt |
D |
Nov. 22, 2019, 3:25 p.m. |
OK |
Java 8 |
TESTS |
44 |
420 |
19148800 |
|
2200 |
48187831 |
wadissimo |
D |
Jan. 10, 2019, 4:08 p.m. |
OK |
Java 8 |
TESTS |
44 |
421 |
0 |
|
2200 |
48037982 |
AJ47 |
D |
Jan. 6, 2019, 4:58 p.m. |
OK |
Java 8 |
TESTS |
44 |
421 |
0 |
|
2200 |
47966094 |
jenish9599 |
D |
Jan. 5, 2019, 12:12 p.m. |
OK |
Java 8 |
TESTS |
44 |
421 |
0 |
|
2200 |
47970009 |
Svyat |
D |
Jan. 5, 2019, 2:08 p.m. |
OK |
Kotlin |
TESTS |
44 |
467 |
102400 |
|
2200 |
60417547 |
Spheniscine |
D |
Sept. 12, 2019, 3:26 a.m. |
OK |
Kotlin |
TESTS |
44 |
560 |
0 |
|
2200 |
60416834 |
Spheniscine |
D |
Sept. 12, 2019, 2:56 a.m. |
OK |
Kotlin |
TESTS |
44 |
717 |
1126400 |
|
2200 |
47936234 |
mircea85 |
D |
Jan. 4, 2019, 4:42 p.m. |
OK |
Mono C# |
TESTS |
44 |
218 |
3072000 |
|
2200 |
47945316 |
riantkb |
D |
Jan. 4, 2019, 7:09 p.m. |
OK |
Mono C# |
TESTS |
44 |
343 |
3072000 |
|
2200 |
48076536 |
eki |
D |
Jan. 8, 2019, 4:49 a.m. |
OK |
Mono C# |
TESTS |
44 |
405 |
0 |
|
2200 |
47956971 |
teru |
D |
Jan. 5, 2019, 6:53 a.m. |
OK |
Mono C# |
TESTS |
44 |
561 |
3174400 |
|
2200 |
48029173 |
vania778 |
D |
Jan. 6, 2019, 11:15 a.m. |
OK |
MS C++ |
TESTS |
44 |
249 |
4300800 |
|
2200 |
50531983 |
wjfwjfwjf |
D |
Feb. 26, 2019, 2:01 p.m. |
OK |
MS C++ |
TESTS |
44 |
249 |
4812800 |
|
2200 |
50531954 |
wjfwjfwjf |
D |
Feb. 26, 2019, 2 p.m. |
OK |
MS C++ |
TESTS |
44 |
249 |
4812800 |
|
2200 |
58940844 |
echr |
D |
Aug. 17, 2019, 6:50 a.m. |
OK |
MS C++ |
TESTS |
44 |
249 |
5632000 |
|
2200 |
50531909 |
wjfwjfwjf |
D |
Feb. 26, 2019, 1:59 p.m. |
OK |
MS C++ |
TESTS |
44 |
264 |
4812800 |
|
2200 |
58941623 |
monggo1995 |
D |
Aug. 17, 2019, 7:10 a.m. |
OK |
MS C++ |
TESTS |
44 |
296 |
56115200 |
|
2200 |
47932579 |
jokerwyt |
D |
Jan. 4, 2019, 4:16 p.m. |
OK |
MS C++ |
TESTS |
44 |
311 |
40140800 |
|
2200 |
48461479 |
ys1468362286 |
D |
Jan. 16, 2019, 2:53 p.m. |
OK |
MS C++ |
TESTS |
44 |
312 |
9011200 |
|
2200 |
48461520 |
vjudge3 |
D |
Jan. 16, 2019, 2:55 p.m. |
OK |
MS C++ |
TESTS |
44 |
327 |
9011200 |
|
2200 |
61052003 |
Timonnable |
D |
Sept. 22, 2019, 6:49 a.m. |
OK |
MS C++ 2017 |
TESTS |
44 |
249 |
5324800 |
|
2200 |
50885557 |
sk0 |
D |
March 6, 2019, 11:09 a.m. |
OK |
Ocaml |
TESTS |
44 |
1341 |
614400 |
|
2200 |
50878640 |
sk0 |
D |
March 6, 2019, 7:56 a.m. |
OK |
Ocaml |
TESTS |
44 |
1341 |
7577600 |
|
2200 |
50660322 |
sk0 |
D |
March 1, 2019, 10:27 p.m. |
OK |
Ocaml |
TESTS |
44 |
1840 |
614400 |
|
2200 |
50660668 |
sk0 |
D |
March 1, 2019, 10:45 p.m. |
OK |
Ocaml |
TESTS |
44 |
1903 |
614400 |
|
2200 |
51302724 |
c1729 |
D |
March 14, 2019, 3:13 p.m. |
OK |
PyPy 2 |
TESTS |
44 |
202 |
4403200 |
|
2200 |
48018093 |
c1729 |
D |
Jan. 6, 2019, 2:12 a.m. |
OK |
PyPy 2 |
TESTS |
44 |
218 |
2457600 |
|
2200 |
51302321 |
c1729 |
D |
March 14, 2019, 3:01 p.m. |
OK |
PyPy 2 |
TESTS |
44 |
249 |
8601600 |
|
2200 |
48018243 |
c1729 |
D |
Jan. 6, 2019, 2:26 a.m. |
OK |
PyPy 2 |
TESTS |
44 |
265 |
4198400 |
|
2200 |
51302240 |
c1729 |
D |
March 14, 2019, 2:58 p.m. |
OK |
PyPy 2 |
TESTS |
44 |
499 |
9011200 |
|
2200 |
48018117 |
c1729 |
D |
Jan. 6, 2019, 2:15 a.m. |
OK |
PyPy 2 |
TESTS |
44 |
545 |
2457600 |
|
2200 |
48017709 |
c1729 |
D |
Jan. 6, 2019, 1:35 a.m. |
OK |
PyPy 2 |
TESTS |
44 |
561 |
921600 |
|
2200 |
48017590 |
c1729 |
D |
Jan. 6, 2019, 1:24 a.m. |
OK |
PyPy 2 |
TESTS |
44 |
561 |
1126400 |
|
2200 |
47948324 |
c1729 |
D |
Jan. 4, 2019, 9:09 p.m. |
OK |
PyPy 2 |
TESTS |
44 |
1013 |
27340800 |
|
2200 |
47948363 |
c1729 |
D |
Jan. 4, 2019, 9:11 p.m. |
OK |
PyPy 2 |
TESTS |
44 |
1029 |
27238400 |
|
2200 |
47951757 |
Kiri8128 |
D |
Jan. 5, 2019, 2:01 a.m. |
OK |
PyPy 3 |
TESTS |
44 |
249 |
3891200 |
|
2200 |
48017766 |
c1729 |
D |
Jan. 6, 2019, 1:40 a.m. |
OK |
PyPy 3 |
TESTS |
44 |
529 |
921600 |
|
2200 |
48017883 |
c1729 |
D |
Jan. 6, 2019, 1:50 a.m. |
OK |
PyPy 3 |
TESTS |
44 |
530 |
1228800 |
|
2200 |
47954420 |
titia |
D |
Jan. 5, 2019, 4:53 a.m. |
OK |
PyPy 3 |
TESTS |
44 |
764 |
2662400 |
|
2200 |
47954294 |
titia |
D |
Jan. 5, 2019, 4:48 a.m. |
OK |
PyPy 3 |
TESTS |
44 |
779 |
2764800 |
|
2200 |
47970713 |
qLethon |
D |
Jan. 5, 2019, 2:32 p.m. |
OK |
PyPy 3 |
TESTS |
44 |
1138 |
7782400 |
|
2200 |
47971029 |
qLethon |
D |
Jan. 5, 2019, 2:43 p.m. |
OK |
PyPy 3 |
TESTS |
44 |
1169 |
7680000 |
|
2200 |
47949567 |
qLethon |
D |
Jan. 4, 2019, 10:31 p.m. |
OK |
PyPy 3 |
TESTS |
44 |
1200 |
7680000 |
|
2200 |
48017257 |
meooow |
D |
Jan. 6, 2019, 12:48 a.m. |
OK |
PyPy 3 |
TESTS |
44 |
1294 |
921600 |
|
2200 |
51302847 |
c1729 |
D |
March 14, 2019, 3:16 p.m. |
OK |
Python 2 |
TESTS |
44 |
1559 |
614400 |
|
2200 |
48018062 |
c1729 |
D |
Jan. 6, 2019, 2:09 a.m. |
OK |
Python 3 |
TESTS |
44 |
748 |
512000 |
|
2200 |
48017975 |
c1729 |
D |
Jan. 6, 2019, 2 a.m. |
OK |
Python 3 |
TESTS |
44 |
810 |
307200 |
|
2200 |
47951671 |
Kiri8128 |
D |
Jan. 5, 2019, 1:53 a.m. |
OK |
Python 3 |
TESTS |
44 |
1325 |
307200 |
|
2200 |
48026962 |
kobae964 |
D |
Jan. 6, 2019, 9:42 a.m. |
OK |
Rust |
TESTS |
44 |
46 |
4403200 |
|
2200 |
60293558 |
sansen |
D |
Sept. 9, 2019, 8:48 a.m. |
OK |
Rust |
TESTS |
44 |
202 |
0 |
|
2200 |
47944311 |
alpha_virginis |
D |
Jan. 4, 2019, 6:50 p.m. |
OK |
Rust |
TESTS |
44 |
358 |
0 |
|
2200 |
remove filters
Back to search problems