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
If you have gone that far, you'll probably skip unnecessary legends anyway... You are given a binary string and an integer . Find the number of integers k , 0 ≤ k < N , such that for all i = 0 , 1 , ..., m - 1 In the first line of input there is a string s consisting of 0 's and 1 's ( 1 ≤ | s | ≤ 40 ). In the next line of input there is an integer n ( 1 ≤ n ≤ 5·10 5 ). Each of the next n lines contains two space-separated integers p i , α i ( 1 ≤ p i , α i ≤ 10 9 , p i is prime). All p i are distinct. A single integer — the answer to the problem. |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
24671326 |
rng_58 |
G |
Feb. 14, 2017, 1:32 p.m. |
OK |
GNU C++ |
TESTS |
81 |
1528 |
254668800 |
|
2800 |
|
24694051 |
reflash11111 |
G |
Feb. 15, 2017, 11:56 a.m. |
OK |
GNU C++ |
TESTS |
81 |
1606 |
170496000 |
|
2800 |
|
24694280 |
reflash11111 |
G |
Feb. 15, 2017, 12:06 p.m. |
OK |
GNU C++ |
TESTS |
81 |
1653 |
170496000 |
|
2800 |
|
24710029 |
matthew99 |
G |
Feb. 16, 2017, 5:27 a.m. |
OK |
GNU C++11 |
TESTS |
81 |
748 |
6451200 |
|
2800 |
|
24665280 |
Radewoosh |
G |
Feb. 14, 2017, 10:36 a.m. |
OK |
GNU C++11 |
TESTS |
81 |
1200 |
199782400 |
|
2800 |
|
24660267 |
V--o_o--V |
G |
Feb. 14, 2017, 9:31 a.m. |
OK |
GNU C++11 |
TESTS |
81 |
1856 |
328806400 |
|
2800 |
|
25112050 |
hpfdf |
G |
Feb. 28, 2017, 11:01 p.m. |
OK |
GNU C++11 |
TESTS |
103 |
3385 |
398233600 |
|
2800 |
|
24717715 |
liujunhao |
G |
Feb. 16, 2017, 12:36 p.m. |
OK |
GNU C++11 |
TESTS |
103 |
3603 |
398233600 |
|
2800 |
|
24705209 |
xsc |
G |
Feb. 15, 2017, 8:43 p.m. |
OK |
GNU C++11 |
TESTS |
81 |
3946 |
254668800 |
|
2800 |
|
28357799 |
krijgertje |
G |
July 7, 2017, 10:56 p.m. |
OK |
GNU C++11 |
TESTS |
103 |
4633 |
438272000 |
|
2800 |
|
26674541 |
aid |
G |
April 26, 2017, 1:48 a.m. |
OK |
GNU C++11 |
TESTS |
103 |
4741 |
156262400 |
|
2800 |
|
35193371 |
zhouyuyang |
G |
Feb. 13, 2018, 8:09 a.m. |
OK |
GNU C++11 |
TESTS |
103 |
4913 |
516608000 |
|
2800 |
|
24682470 |
BSBandme |
G |
Feb. 14, 2017, 10:44 p.m. |
OK |
GNU C++11 |
TESTS |
81 |
4960 |
15257600 |
|
2800 |
|
24667492 |
simonlindholm |
G |
Feb. 14, 2017, 11:03 a.m. |
OK |
GNU C++14 |
TESTS |
81 |
1154 |
226816000 |
|
2800 |
|
24674358 |
unused |
G |
Feb. 14, 2017, 3:30 p.m. |
OK |
GNU C++14 |
TESTS |
81 |
1372 |
158412800 |
|
2800 |
|
24677487 |
unused |
G |
Feb. 14, 2017, 5:41 p.m. |
OK |
GNU C++14 |
TESTS |
81 |
1434 |
159744000 |
|
2800 |
|
24673786 |
anouer-D |
G |
Feb. 14, 2017, 3:08 p.m. |
OK |
GNU C++14 |
TESTS |
81 |
1544 |
254668800 |
|
2800 |
|
24682332 |
Murtazo.Ali |
G |
Feb. 14, 2017, 10:28 p.m. |
OK |
GNU C++14 |
TESTS |
81 |
1575 |
328601600 |
|
2800 |
|
24707930 |
Endagorion |
G |
Feb. 16, 2017, 1:55 a.m. |
OK |
GNU C++14 |
TESTS |
81 |
1980 |
336793600 |
|
2800 |
|
24707929 |
Endagorion |
G |
Feb. 16, 2017, 1:55 a.m. |
OK |
GNU C++14 |
TESTS |
81 |
2339 |
37990400 |
|
2800 |
|
24732539 |
xsc |
G |
Feb. 17, 2017, 6:15 a.m. |
OK |
GNU C++14 |
TESTS |
103 |
3400 |
398233600 |
|
2800 |
|
25128614 |
JoelSotoMamani |
G |
March 1, 2017, 4:20 p.m. |
OK |
GNU C++14 |
TESTS |
103 |
3431 |
398233600 |
|
2800 |
|
25671917 |
izban |
G |
March 20, 2017, 5:04 p.m. |
OK |
GNU C++14 |
TESTS |
103 |
3775 |
298700800 |
|
2800 |
|
24678074 |
Lewin |
G |
Feb. 14, 2017, 6:06 p.m. |
OK |
Java 8 |
TESTS |
81 |
4570 |
45056000 |
|
2800 |
remove filters
Back to search problems