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"Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not. One day Petya came across an interval of numbers [a, xe2 x80 x89a xe2 x80 x89+ xe2 x80 x89l xe2 x80 x89- xe2 x80 x891]. Let F(x) be the number of lucky digits of number x. Find the minimum b (a xe2 x80 x89< xe2 x80 x89b) such, that F(a) = F(b), F(a xe2 x80 x89+ xe2 x80 x891) = F(b xe2 x80 x89+ xe2 x80 x891), ..., F(a xe2 x80 x89+ xe2 x80 x89l xe2 x80 x89- xe2 x80 x891) = F(b xe2 x80 x89+ xe2 x80 x89l xe2 x80 x89- xe2 x80 x891). The single line contains two integers a and l (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a, xe2 x80 x89l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the interval's first number and the interval's length correspondingly. On the single line print number b -- the answer to the problem. Consider that [a, xe2 x80 x89b] denotes an interval of integers; this interval includes the boundaries. That is, "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
15452338 |
Ioser |
E |
Jan. 20, 2016, 11:37 a.m. |
OK |
GNU C++ |
TESTS |
166 |
15 |
0 |
|
2600 |
15419917 |
jiaqiyang |
E |
Jan. 17, 2016, 11:53 p.m. |
OK |
GNU C++ |
TESTS |
166 |
15 |
0 |
|
2600 |
17473478 |
Ivan_w |
E |
April 23, 2016, 7:24 p.m. |
OK |
GNU C++ |
TESTS |
166 |
15 |
2252800 |
|
2600 |
5690396 |
gjh |
E |
Jan. 14, 2014, 12:19 p.m. |
OK |
GNU C++ |
TESTS |
166 |
30 |
0 |
|
2600 |
5272105 |
glassices |
E |
Nov. 27, 2013, 12:40 p.m. |
OK |
GNU C++ |
TESTS |
166 |
30 |
0 |
|
2600 |
15452271 |
z123z123d |
E |
Jan. 20, 2016, 11:32 a.m. |
OK |
GNU C++ |
TESTS |
166 |
30 |
102400 |
|
2600 |
908148 |
wayne-ho |
E |
Nov. 27, 2011, 11:35 p.m. |
OK |
GNU C++ |
TESTS |
166 |
30 |
1433600 |
|
2600 |
908095 |
wayne-ho |
E |
Nov. 27, 2011, 12:49 p.m. |
OK |
GNU C++ |
TESTS |
166 |
30 |
1433600 |
|
2600 |
908084 |
wayne-ho |
E |
Nov. 27, 2011, 12:47 p.m. |
OK |
GNU C++ |
TESTS |
166 |
30 |
1433600 |
|
2600 |
908068 |
wayne-ho |
E |
Nov. 27, 2011, 12:37 p.m. |
OK |
GNU C++ |
TESTS |
166 |
30 |
1433600 |
|
2600 |
7040720 |
FancyCoder |
E |
July 7, 2014, 12:24 p.m. |
OK |
GNU C++0x |
TESTS |
166 |
2028 |
0 |
|
2600 |
40862053 |
zhouyuyang |
E |
July 27, 2018, 10:56 p.m. |
OK |
GNU C++11 |
TESTS |
166 |
31 |
0 |
|
2600 |
40781802 |
zhouyuyang |
E |
July 26, 2018, 2:15 p.m. |
OK |
GNU C++11 |
TESTS |
166 |
31 |
0 |
|
2600 |
17481110 |
EZ_fwtt08 |
E |
April 24, 2016, 3:44 p.m. |
OK |
GNU C++11 |
TESTS |
166 |
62 |
2252800 |
|
2600 |
57904301 |
lopare |
E |
July 28, 2019, 4:58 p.m. |
OK |
GNU C++11 |
TESTS |
166 |
826 |
0 |
|
2600 |
27471437 |
754986421653 |
E |
May 31, 2017, 4:51 p.m. |
OK |
GNU C++11 |
TESTS |
166 |
982 |
0 |
|
2600 |
27948934 |
Don_Pablo |
E |
June 21, 2017, 3:34 p.m. |
OK |
GNU C++11 |
TESTS |
166 |
982 |
2150400 |
|
2600 |
35836914 |
______n______ |
E |
March 2, 2018, 1:04 p.m. |
OK |
GNU C++11 |
TESTS |
166 |
998 |
2150400 |
|
2600 |
35836906 |
______u______ |
E |
March 2, 2018, 1:04 p.m. |
OK |
GNU C++11 |
TESTS |
166 |
998 |
2150400 |
|
2600 |
35836904 |
_____i_____ |
E |
March 2, 2018, 1:04 p.m. |
OK |
GNU C++11 |
TESTS |
166 |
998 |
2150400 |
|
2600 |
35836890 |
_____k_____ |
E |
March 2, 2018, 1:04 p.m. |
OK |
GNU C++11 |
TESTS |
166 |
998 |
2150400 |
|
2600 |
56017718 |
sorry_im_smurfing |
E |
June 24, 2019, 11 p.m. |
OK |
GNU C++14 |
TESTS |
166 |
841 |
0 |
|
2600 |
23671207 |
Ali.Pi |
E |
Jan. 9, 2017, 9:17 p.m. |
OK |
GNU C++14 |
TESTS |
166 |
998 |
1945600 |
|
2600 |
64745046 |
artur.socha |
E |
Nov. 12, 2019, 1:15 p.m. |
OK |
GNU C++14 |
TESTS |
166 |
1684 |
217600000 |
|
2600 |
64744629 |
artur.socha |
E |
Nov. 12, 2019, 1:07 p.m. |
OK |
GNU C++14 |
TESTS |
166 |
2479 |
217600000 |
|
2600 |
64715157 |
artur.socha |
E |
Nov. 11, 2019, 9:18 p.m. |
OK |
GNU C++14 |
TESTS |
166 |
3197 |
217600000 |
|
2600 |
40664835 |
ruo |
E |
July 23, 2018, 9:05 a.m. |
OK |
GNU C++17 |
TESTS |
166 |
904 |
0 |
|
2600 |
645791 |
Petr |
E |
Aug. 29, 2011, 4:41 p.m. |
OK |
Java 6 |
TESTS |
166 |
110 |
34918400 |
|
2600 |
650907 |
OgieKako |
E |
Aug. 30, 2011, 2:15 a.m. |
OK |
Java 6 |
TESTS |
166 |
110 |
35225600 |
|
2600 |
2798190 |
litaoye |
E |
Dec. 20, 2012, 12:29 p.m. |
OK |
Mono C# |
TESTS |
166 |
46 |
3072000 |
|
2600 |
3521520 |
caopeng |
E |
April 13, 2013, 12:10 a.m. |
OK |
MS C++ |
TESTS |
166 |
46 |
6656000 |
|
2600 |
667351 |
goodwind |
E |
Sept. 4, 2011, 10:14 a.m. |
OK |
Python 2 |
TESTS |
166 |
80 |
2867200 |
|
2600 |
remove filters
Back to search problems