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'For a given prime integer p and integers xce xb1, xe2 x80 x89A calculate the number of pairs of integers (n, xe2 x80 x89k), such that 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89A and is divisible by p xce xb1. As the answer can be rather large, print the remainder of the answer moduly 109 xe2 x80 x89+ xe2 x80 x897. Let us remind you that is the number of ways k objects can be chosen from the set of n objects. The first line contains two integers, p and xce xb1 (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89p, xe2 x80 x89 xce xb1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109, p is prime). The second line contains the decimal record of integer A (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89A xe2 x80 x89< xe2 x80 x89101000) without leading zeroes. In the single line print the answer to the problem. In the first sample three binominal coefficients divisible by 4 are , and .'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
29681133 |
Worldwide_D |
D |
Aug. 22, 2017, 11:25 a.m. |
OK |
GNU C++ |
TESTS |
66 |
405 |
185753600 |
|
3100 |
29805102 |
progg_admin |
D |
Aug. 26, 2017, 11:29 a.m. |
OK |
GNU C++ |
TESTS |
66 |
420 |
185753600 |
|
3100 |
31973248 |
xianhaoming |
D |
Nov. 2, 2017, 9:13 a.m. |
OK |
GNU C++ |
TESTS |
66 |
421 |
197120000 |
|
3100 |
40986035 |
ReaLNero1 |
D |
July 30, 2018, 8:19 p.m. |
OK |
GNU C++ |
TESTS |
66 |
436 |
185753600 |
|
3100 |
31500279 |
zhoujundong |
D |
Oct. 19, 2017, 7:32 a.m. |
OK |
GNU C++ |
TESTS |
66 |
451 |
259891200 |
|
3100 |
35894604 |
_____k_____ |
D |
March 3, 2018, 4:25 p.m. |
OK |
GNU C++ |
TESTS |
66 |
530 |
258764800 |
|
3100 |
35893879 |
______n______ |
D |
March 3, 2018, 4:08 p.m. |
OK |
GNU C++ |
TESTS |
66 |
530 |
258764800 |
|
3100 |
35893816 |
______u______ |
D |
March 3, 2018, 4:07 p.m. |
OK |
GNU C++ |
TESTS |
66 |
530 |
258764800 |
|
3100 |
35888268 |
_____i_____ |
D |
March 3, 2018, 2:18 p.m. |
OK |
GNU C++ |
TESTS |
66 |
530 |
258764800 |
|
3100 |
35884684 |
______h______ |
D |
March 3, 2018, 1:15 p.m. |
OK |
GNU C++ |
TESTS |
66 |
530 |
258764800 |
|
3100 |
66036919 |
Lagoon_ |
D |
Nov. 30, 2019, 12:07 p.m. |
OK |
GNU C++11 |
TESTS |
66 |
280 |
1433600 |
|
3100 |
65687836 |
zx2003 |
D |
Nov. 25, 2019, 2:04 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
296 |
256512000 |
|
3100 |
63429818 |
ZhongJQ |
D |
Oct. 26, 2019, 8:49 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
311 |
177971200 |
|
3100 |
69664287 |
ningyuheng |
D |
Jan. 28, 2020, 10:43 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
312 |
180531200 |
|
3100 |
22425545 |
MohanLau |
D |
Nov. 23, 2016, 2:42 p.m. |
OK |
GNU C++11 |
TESTS |
66 |
342 |
260915200 |
|
3100 |
69667605 |
justin_cao |
D |
Jan. 28, 2020, 11:55 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
358 |
185753600 |
|
3100 |
54085671 |
xielinhan |
D |
May 14, 2019, 7:12 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
358 |
185753600 |
|
3100 |
53040917 |
memset_inf |
D |
April 20, 2019, 9:48 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
358 |
185753600 |
|
3100 |
65711559 |
A.K.E.E. |
D |
Nov. 25, 2019, 2:34 p.m. |
OK |
GNU C++11 |
TESTS |
66 |
358 |
197017600 |
|
3100 |
69825246 |
Kewth |
D |
Jan. 30, 2020, 9 a.m. |
OK |
GNU C++11 |
TESTS |
66 |
373 |
204800 |
|
3100 |
58932720 |
Scut82 |
D |
Aug. 17, 2019, 1:59 a.m. |
OK |
GNU C++14 |
TESTS |
66 |
217 |
257024000 |
|
3100 |
58930466 |
Scut82 |
D |
Aug. 16, 2019, 11:45 p.m. |
OK |
GNU C++14 |
TESTS |
66 |
264 |
257228800 |
|
3100 |
65943994 |
PinkRabbit |
D |
Nov. 29, 2019, 7:46 a.m. |
OK |
GNU C++14 |
TESTS |
66 |
343 |
102400 |
|
3100 |
65472651 |
mayaohua2003 |
D |
Nov. 21, 2019, 8:55 a.m. |
OK |
GNU C++14 |
TESTS |
66 |
436 |
204800 |
|
3100 |
31507335 |
shaochengxi |
D |
Oct. 19, 2017, 12:16 p.m. |
OK |
GNU C++14 |
TESTS |
66 |
545 |
259174400 |
|
3100 |
31507402 |
shaochengxi |
D |
Oct. 19, 2017, 12:18 p.m. |
OK |
GNU C++14 |
TESTS |
66 |
780 |
259072000 |
|
3100 |
63389635 |
zsyzsy |
D |
Oct. 25, 2019, 2:48 p.m. |
OK |
GNU C++14 |
TESTS |
66 |
904 |
257126400 |
|
3100 |
65793208 |
zhouzhendong |
D |
Nov. 27, 2019, 1:19 a.m. |
OK |
GNU C++14 |
TESTS |
66 |
935 |
197222400 |
|
3100 |
64776295 |
Created_equal |
D |
Nov. 13, 2019, 4:33 a.m. |
OK |
GNU C++14 |
TESTS |
66 |
982 |
102400 |
|
3100 |
69710423 |
vjudge2 |
D |
Jan. 29, 2020, 6:47 a.m. |
OK |
GNU C++14 |
TESTS |
66 |
1076 |
185548800 |
|
3100 |
64740905 |
CMXRYNP |
D |
Nov. 12, 2019, 11:57 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
265 |
197017600 |
|
3100 |
69825322 |
vjudge2 |
D |
Jan. 30, 2020, 9:01 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
358 |
307200 |
|
3100 |
63519569 |
alan_cty |
D |
Oct. 27, 2019, 3:03 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
436 |
196915200 |
|
3100 |
59941976 |
Isonan |
D |
Sept. 3, 2019, 11:46 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
452 |
213811200 |
|
3100 |
65740395 |
Fulisike |
D |
Nov. 26, 2019, 9:54 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
529 |
257228800 |
|
3100 |
66816171 |
ruo |
D |
Dec. 14, 2019, 5:51 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
702 |
204800 |
|
3100 |
62429718 |
kefaa2 |
D |
Oct. 12, 2019, 3:26 p.m. |
OK |
GNU C++17 |
TESTS |
66 |
1122 |
102400 |
|
3100 |
44726651 |
Shayan.P |
D |
Oct. 23, 2018, 8:21 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
1247 |
614400 |
|
3100 |
45398982 |
Los_Angelos_Laycurse |
D |
Nov. 7, 2018, 7:08 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
1341 |
178278400 |
|
3100 |
65800069 |
Infleaking |
D |
Nov. 27, 2019, 6:59 a.m. |
OK |
GNU C++17 |
TESTS |
66 |
1746 |
7475200 |
|
3100 |
13381233 |
fotiIe96 |
D |
Oct. 3, 2015, 6:23 p.m. |
OK |
Java 7 |
TESTS |
66 |
1543 |
0 |
|
3100 |
13390531 |
enot110 |
D |
Oct. 3, 2015, 9:23 p.m. |
OK |
Java 7 |
TESTS |
66 |
1964 |
215654400 |
|
3100 |
13428925 |
uwi |
D |
Oct. 6, 2015, 8:51 a.m. |
OK |
Java 8 |
TESTS |
66 |
686 |
0 |
|
3100 |
13384961 |
mmaxio |
D |
Oct. 3, 2015, 6:53 p.m. |
OK |
Java 8 |
TESTS |
66 |
1216 |
0 |
|
3100 |
13423758 |
uwi |
D |
Oct. 5, 2015, 10 p.m. |
OK |
Java 8 |
TESTS |
66 |
1902 |
0 |
|
3100 |
13396643 |
ershov.stanislav |
D |
Oct. 4, 2015, 7:16 a.m. |
OK |
Java 8 |
TESTS |
66 |
3619 |
0 |
|
3100 |
23471399 |
sdya |
D |
Dec. 31, 2016, 2:53 p.m. |
OK |
MS C++ |
TESTS |
66 |
717 |
2355200 |
|
3100 |
13385697 |
Milanin |
D |
Oct. 3, 2015, 7:51 p.m. |
OK |
MS C++ |
TESTS |
66 |
733 |
307200 |
|
3100 |
23471272 |
sdya |
D |
Dec. 31, 2016, 2:45 p.m. |
OK |
MS C++ |
TESTS |
66 |
889 |
2355200 |
|
3100 |
15203791 |
OnionPringles |
D |
Jan. 6, 2016, 12:22 p.m. |
OK |
MS C++ |
TESTS |
66 |
3260 |
185344000 |
|
3100 |
remove filters
Back to search problems