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.
Problems
B'You are given two positive integer numbers x and y. An array F is called an y-factorization of x iff the following conditions are met: You have to count the number of pairwise distinct arrays that are y-factorizations of x. Two arrays A and B are considered different iff there exists at least one index i (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89y) such that Ai xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89Bi. Since the answer can be very large, print it modulo 109 xe2 x80 x89+ xe2 x80 x897. The first line contains one integer q (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of testcases to solve. Then q lines follow, each containing two integers xi and yi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi, xe2 x80 x89yi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106). Each of these lines represents a testcase. Print q integers. i-th integer has to be equal to the number of yi-factorizations of xi modulo 109 xe2 x80 x89+ xe2 x80 x897. In the second testcase of the example there are six y-factorizations: '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
65606734 |
asorak |
E |
Nov. 23, 2019, 9:16 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
45 |
2448 |
141414400 |
|
2000 |
65606621 |
asorak |
E |
Nov. 23, 2019, 9:11 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
45 |
2480 |
145408000 |
|
2000 |
65608541 |
asorak |
E |
Nov. 23, 2019, 10:44 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
45 |
2557 |
141414400 |
|
2000 |
65606096 |
asorak |
E |
Nov. 23, 2019, 8:49 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
45 |
2620 |
161484800 |
|
2000 |
32634410 |
ruban |
E |
Nov. 25, 2017, 12:53 a.m. |
OK |
Delphi |
TESTS |
45 |
1232 |
262758400 |
|
2000 |
32628124 |
ruban |
E |
Nov. 24, 2017, 5:28 p.m. |
OK |
FPC |
TESTS |
45 |
701 |
261836800 |
|
2000 |
32597385 |
ruban |
E |
Nov. 23, 2017, 4:57 p.m. |
OK |
FPC |
TESTS |
45 |
716 |
261836800 |
|
2000 |
32609326 |
ImForbiddenToSayILoveYou |
E |
Nov. 24, 2017, 3:14 a.m. |
OK |
FPC |
TESTS |
45 |
1232 |
45772800 |
|
2000 |
32644477 |
AsahiKasugano |
E |
Nov. 25, 2017, 10:50 a.m. |
OK |
FPC |
TESTS |
45 |
1512 |
49766400 |
|
2000 |
32692571 |
sadiaanjum |
E |
Nov. 26, 2017, 6:33 p.m. |
OK |
GNU C |
TESTS |
45 |
217 |
90419200 |
|
2000 |
32600340 |
xzm2020 |
E |
Nov. 23, 2017, 5:36 p.m. |
OK |
GNU C |
TESTS |
45 |
233 |
90419200 |
|
2000 |
32600896 |
sgtlaugh |
E |
Nov. 23, 2017, 5:53 p.m. |
OK |
GNU C |
TESTS |
45 |
1887 |
252006400 |
|
2000 |
32600919 |
sgtlaugh |
E |
Nov. 23, 2017, 5:53 p.m. |
OK |
GNU C |
TESTS |
45 |
2011 |
252006400 |
|
2000 |
33471294 |
vjudge1 |
E |
Dec. 21, 2017, 5:59 a.m. |
OK |
GNU C++ |
TESTS |
45 |
93 |
32153600 |
|
2000 |
33471291 |
vjudge4 |
E |
Dec. 21, 2017, 5:58 a.m. |
OK |
GNU C++ |
TESTS |
45 |
93 |
32153600 |
|
2000 |
40979096 |
ReaLNero1 |
E |
July 30, 2018, 4:56 p.m. |
OK |
GNU C++ |
TESTS |
45 |
108 |
30105600 |
|
2000 |
32608277 |
Aviously |
E |
Nov. 24, 2017, 1:42 a.m. |
OK |
GNU C++ |
TESTS |
45 |
140 |
18124800 |
|
2000 |
32612548 |
Unsterblicher_Geist |
E |
Nov. 24, 2017, 6:58 a.m. |
OK |
GNU C++ |
TESTS |
45 |
140 |
43929600 |
|
2000 |
32823953 |
sxqqslf |
E |
Dec. 1, 2017, 7:51 a.m. |
OK |
GNU C++ |
TESTS |
45 |
156 |
34099200 |
|
2000 |
34402907 |
vjudge1 |
E |
Jan. 21, 2018, 6:39 a.m. |
OK |
GNU C++ |
TESTS |
45 |
171 |
99225600 |
|
2000 |
41273888 |
CalvinJin |
E |
Aug. 6, 2018, 12:08 p.m. |
OK |
GNU C++ |
TESTS |
45 |
187 |
23142400 |
|
2000 |
35449023 |
vjudge1 |
E |
Feb. 18, 2018, 2:46 p.m. |
OK |
GNU C++ |
TESTS |
45 |
187 |
82227200 |
|
2000 |
33800188 |
vjudge5 |
E |
Dec. 30, 2017, 4 a.m. |
OK |
GNU C++ |
TESTS |
45 |
202 |
9932800 |
|
2000 |
52927834 |
rainboy |
E |
April 17, 2019, 10:13 p.m. |
OK |
GNU C11 |
TESTS |
45 |
530 |
36044800 |
|
2000 |
33531926 |
alexey.orlov |
E |
Dec. 23, 2017, 9:57 a.m. |
OK |
GNU C11 |
TESTS |
45 |
857 |
163328000 |
|
2000 |
32738163 |
parcelpath |
E |
Nov. 28, 2017, 1:34 a.m. |
OK |
GNU C11 |
TESTS |
45 |
888 |
25907200 |
|
2000 |
32740294 |
parcelpath |
E |
Nov. 28, 2017, 4:55 a.m. |
OK |
GNU C11 |
TESTS |
45 |
888 |
26009600 |
|
2000 |
56607107 |
vjudge1 |
E |
July 6, 2019, 5:24 a.m. |
OK |
GNU C11 |
TESTS |
45 |
1388 |
153702400 |
|
2000 |
60847029 |
vjudge5 |
E |
Sept. 19, 2019, 12:52 p.m. |
OK |
GNU C++11 |
TESTS |
45 |
124 |
27852800 |
|
2000 |
56879386 |
IDDFS |
E |
July 12, 2019, 9:40 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
139 |
27852800 |
|
2000 |
61252736 |
vjudge1 |
E |
Sept. 25, 2019, 8:55 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
139 |
32051200 |
|
2000 |
56879404 |
vjudge5 |
E |
July 12, 2019, 9:41 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
140 |
27852800 |
|
2000 |
57000828 |
vjudge5 |
E |
July 14, 2019, 3:25 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
155 |
64000000 |
|
2000 |
32697128 |
krijgertje |
E |
Nov. 26, 2017, 11:58 p.m. |
OK |
GNU C++11 |
TESTS |
45 |
155 |
94208000 |
|
2000 |
32907342 |
JhonnyZaz |
E |
Dec. 3, 2017, 8:05 p.m. |
OK |
GNU C++11 |
TESTS |
45 |
156 |
14131200 |
|
2000 |
32647853 |
PlayfulPanda |
E |
Nov. 25, 2017, 1:08 p.m. |
OK |
GNU C++11 |
TESTS |
45 |
156 |
30105600 |
|
2000 |
38877508 |
sudharsansai |
E |
June 2, 2018, 7:23 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
171 |
16896000 |
|
2000 |
32614166 |
txingml |
E |
Nov. 24, 2017, 8:16 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
171 |
18124800 |
|
2000 |
32603404 |
Husayn_Hasanov |
E |
Nov. 23, 2017, 7:22 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
140 |
17920000 |
|
2000 |
32608213 |
Aviously |
E |
Nov. 24, 2017, 1:38 a.m. |
OK |
GNU C++14 |
TESTS |
45 |
140 |
17920000 |
|
2000 |
32603858 |
Husayn_Hasanov |
E |
Nov. 23, 2017, 7:45 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
140 |
17920000 |
|
2000 |
32603063 |
Aviously |
E |
Nov. 23, 2017, 7:06 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
140 |
17920000 |
|
2000 |
32600127 |
Kerim.K |
E |
Nov. 23, 2017, 5:31 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
140 |
17920000 |
|
2000 |
32636832 |
mengrao |
E |
Nov. 25, 2017, 4:50 a.m. |
OK |
GNU C++14 |
TESTS |
45 |
155 |
17920000 |
|
2000 |
32672740 |
achm |
E |
Nov. 26, 2017, 1:32 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
155 |
18944000 |
|
2000 |
32636865 |
mengrao |
E |
Nov. 25, 2017, 4:53 a.m. |
OK |
GNU C++14 |
TESTS |
45 |
156 |
13926400 |
|
2000 |
32636856 |
mengrao |
E |
Nov. 25, 2017, 4:52 a.m. |
OK |
GNU C++14 |
TESTS |
45 |
156 |
17920000 |
|
2000 |
32648469 |
Vintarel |
E |
Nov. 25, 2017, 1:32 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
156 |
17920000 |
|
2000 |
48788545 |
dmkozyrev |
E |
Jan. 23, 2019, 10:09 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
139 |
13721600 |
|
2000 |
57000877 |
Lower_Rating |
E |
July 14, 2019, 3:27 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
156 |
32051200 |
|
2000 |
48788217 |
dmkozyrev |
E |
Jan. 23, 2019, 10 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
171 |
13619200 |
|
2000 |
53805907 |
vjudge4 |
E |
May 6, 2019, 12:42 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
171 |
24064000 |
|
2000 |
57794533 |
465798176 |
E |
July 26, 2019, 10:54 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
171 |
29184000 |
|
2000 |
57000886 |
vjudge4 |
E |
July 14, 2019, 3:28 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
171 |
32051200 |
|
2000 |
44348089 |
sagniknitr |
E |
Oct. 15, 2018, 8:30 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
187 |
12288000 |
|
2000 |
40263078 |
codgician |
E |
July 13, 2018, 1:28 p.m. |
OK |
GNU C++17 |
TESTS |
45 |
187 |
28057600 |
|
2000 |
55652985 |
quake0 |
E |
June 16, 2019, 3:33 p.m. |
OK |
GNU C++17 |
TESTS |
45 |
187 |
92160000 |
|
2000 |
41128372 |
LHiC |
E |
Aug. 2, 2018, 3:34 p.m. |
OK |
GNU C++17 |
TESTS |
45 |
202 |
21094400 |
|
2000 |
64350148 |
HappyEveryday |
E |
Nov. 6, 2019, 8 a.m. |
OK |
Java 11 |
TESTS |
45 |
2542 |
138956800 |
|
2000 |
40239211 |
noobied |
E |
July 12, 2018, 5:15 p.m. |
OK |
Java 8 |
TESTS |
45 |
358 |
17408000 |
|
2000 |
32631716 |
pitfall |
E |
Nov. 24, 2017, 8:18 p.m. |
OK |
Java 8 |
TESTS |
45 |
358 |
37273600 |
|
2000 |
37028103 |
Taran_1407 |
E |
April 6, 2018, 5:43 p.m. |
OK |
Java 8 |
TESTS |
45 |
358 |
54476800 |
|
2000 |
55587358 |
Ahmed_Diab |
E |
June 15, 2019, 10:20 a.m. |
OK |
Java 8 |
TESTS |
45 |
389 |
20172800 |
|
2000 |
32617868 |
rahulkhairwar |
E |
Nov. 24, 2017, 10:53 a.m. |
OK |
Java 8 |
TESTS |
45 |
390 |
39526400 |
|
2000 |
32673438 |
rahulkhairwar |
E |
Nov. 26, 2017, 2:08 p.m. |
OK |
Java 8 |
TESTS |
45 |
405 |
38400000 |
|
2000 |
32830203 |
prakhar28 |
E |
Dec. 1, 2017, 12:55 p.m. |
OK |
Java 8 |
TESTS |
45 |
467 |
62464000 |
|
2000 |
33067416 |
Kharouba |
E |
Dec. 9, 2017, 7:16 p.m. |
OK |
Java 8 |
TESTS |
45 |
592 |
200908800 |
|
2000 |
33584544 |
poikniok |
E |
Dec. 24, 2017, 5:54 a.m. |
OK |
Java 8 |
TESTS |
45 |
608 |
20889600 |
|
2000 |
33584600 |
poikniok |
E |
Dec. 24, 2017, 5:56 a.m. |
OK |
Java 8 |
TESTS |
45 |
623 |
20889600 |
|
2000 |
32623213 |
SlavaG |
E |
Nov. 24, 2017, 2:06 p.m. |
OK |
Kotlin |
TESTS |
45 |
702 |
82124800 |
|
2000 |
32623374 |
SlavaG |
E |
Nov. 24, 2017, 2:12 p.m. |
OK |
Kotlin |
TESTS |
45 |
748 |
82124800 |
|
2000 |
57381174 |
vjudge2 |
E |
July 20, 2019, 2:38 p.m. |
OK |
MS C++ |
TESTS |
45 |
202 |
40140800 |
|
2000 |
32611385 |
mrkimkim |
E |
Nov. 24, 2017, 5:47 a.m. |
OK |
MS C++ |
TESTS |
45 |
530 |
6041600 |
|
2000 |
56978987 |
vjudge3 |
E |
July 13, 2019, 1:14 p.m. |
OK |
MS C++ |
TESTS |
45 |
873 |
16076800 |
|
2000 |
57011346 |
vjudge2 |
E |
July 14, 2019, 9:26 a.m. |
OK |
MS C++ |
TESTS |
45 |
920 |
16076800 |
|
2000 |
41416635 |
vjudge3 |
E |
Aug. 10, 2018, 3:30 a.m. |
OK |
MS C++ |
TESTS |
45 |
967 |
32051200 |
|
2000 |
56878097 |
vjudge5 |
E |
July 12, 2019, 9:07 a.m. |
OK |
MS C++ |
TESTS |
45 |
1076 |
32051200 |
|
2000 |
56878139 |
vjudge3 |
E |
July 12, 2019, 9:08 a.m. |
OK |
MS C++ |
TESTS |
45 |
1091 |
32051200 |
|
2000 |
32629483 |
Khazhak |
E |
Nov. 24, 2017, 6:30 p.m. |
OK |
MS C++ |
TESTS |
45 |
1341 |
233984000 |
|
2000 |
41382004 |
vjudge5 |
E |
Aug. 9, 2018, 2:56 a.m. |
OK |
MS C++ |
TESTS |
45 |
1357 |
16076800 |
|
2000 |
32754271 |
gitarist |
E |
Nov. 28, 2017, 3:10 p.m. |
OK |
MS C++ |
TESTS |
45 |
1762 |
70144000 |
|
2000 |
32656742 |
Darooha |
E |
Nov. 25, 2017, 8:44 p.m. |
OK |
Ocaml |
TESTS |
45 |
920 |
64409600 |
|
2000 |
38542516 |
Ali_Pi |
E |
May 22, 2018, 5:07 p.m. |
OK |
PyPy 2 |
TESTS |
45 |
1716 |
7372800 |
|
2000 |
58240394 |
ssk497 |
E |
Aug. 4, 2019, 12:05 a.m. |
OK |
PyPy 2 |
TESTS |
45 |
2074 |
10240000 |
|
2000 |
32632994 |
denny_sem |
E |
Nov. 24, 2017, 9:56 p.m. |
OK |
PyPy 3 |
TESTS |
45 |
2402 |
32153600 |
|
2000 |
32604849 |
shashkovs |
E |
Nov. 23, 2017, 8:41 p.m. |
OK |
PyPy 3 |
TESTS |
45 |
2402 |
32153600 |
|
2000 |
32633492 |
shashkovs |
E |
Nov. 24, 2017, 10:49 p.m. |
OK |
PyPy 3 |
TESTS |
45 |
2667 |
39936000 |
|
2000 |
41433364 |
Onesh0t |
E |
Aug. 10, 2018, 1:43 p.m. |
OK |
PyPy 3 |
TESTS |
45 |
2854 |
127795200 |
|
2000 |
32633243 |
shashkovs |
E |
Nov. 24, 2017, 10:23 p.m. |
OK |
Python 3 |
TESTS |
45 |
2995 |
17510400 |
|
2000 |
34828771 |
hatoo |
E |
Feb. 2, 2018, 6:29 a.m. |
OK |
Rust |
TESTS |
45 |
296 |
57548800 |
|
2000 |
34828667 |
hatoo |
E |
Feb. 2, 2018, 6:25 a.m. |
OK |
Rust |
TESTS |
45 |
780 |
57548800 |
|
2000 |
34828632 |
hatoo |
E |
Feb. 2, 2018, 6:23 a.m. |
OK |
Rust |
TESTS |
45 |
1013 |
113664000 |
|
2000 |
remove filters
Back to search problems