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'A positive integer a is given. Baron Munchausen claims that he knows such a positive integer n that if one multiplies n by a , the sum of its digits decreases a times. In other words, S(an) = S(n)/a , where S(x) denotes the sum of digits of the number x . Find out if what Baron told can be true. The only line contains a single integer a ( 2 <= a <= 10^3 ). If there is no such number n , print -1 . Otherwise print any appropriate positive integer n . Your number must not consist of more than 5 cdot10^5 digits. We can show that under given constraints either there is no answer, or there is an answer no longer than 5 cdot10^5 digits. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
62780242 |
TianPingXing |
E |
Oct. 17, 2019, 12:43 p.m. |
OK |
GNU C++11 |
TESTS |
71 |
31 |
1536000 |
|
3000 |
54263741 |
vjudge1 |
E |
May 17, 2019, 4:18 a.m. |
OK |
GNU C++11 |
TESTS |
71 |
31 |
1536000 |
|
3000 |
52771543 |
Pickupwin |
E |
April 15, 2019, 9:09 a.m. |
OK |
GNU C++11 |
TESTS |
71 |
109 |
41676800 |
|
3000 |
50804082 |
frodakcin |
E |
March 5, 2019, 3:32 a.m. |
OK |
GNU C++11 |
TESTS |
71 |
109 |
44646400 |
|
3000 |
54172048 |
Fister |
E |
May 15, 2019, 11:43 a.m. |
OK |
GNU C++11 |
TESTS |
71 |
124 |
68710400 |
|
3000 |
54165635 |
Ark_ |
E |
May 15, 2019, 8:35 a.m. |
OK |
GNU C++11 |
TESTS |
71 |
124 |
68710400 |
|
3000 |
54165105 |
Master_Yi |
E |
May 15, 2019, 8:20 a.m. |
OK |
GNU C++11 |
TESTS |
71 |
124 |
68710400 |
|
3000 |
54152121 |
Master_Yi |
E |
May 15, 2019, 1:19 a.m. |
OK |
GNU C++11 |
TESTS |
71 |
124 |
68710400 |
|
3000 |
54165654 |
vjudge4 |
E |
May 15, 2019, 8:35 a.m. |
OK |
GNU C++11 |
TESTS |
71 |
139 |
68710400 |
|
3000 |
56711683 |
BigBag |
E |
July 8, 2019, 12:58 p.m. |
OK |
GNU C++11 |
TESTS |
71 |
140 |
28979200 |
|
3000 |
51858019 |
luk.pkhakadze |
E |
March 26, 2019, noon |
OK |
GNU C++14 |
TESTS |
71 |
31 |
307200 |
|
3000 |
51872027 |
cookiedoth |
E |
March 26, 2019, 5:50 p.m. |
OK |
GNU C++14 |
TESTS |
71 |
124 |
64409600 |
|
3000 |
54172398 |
vjudge1 |
E |
May 15, 2019, 11:56 a.m. |
OK |
GNU C++14 |
TESTS |
71 |
124 |
68812800 |
|
3000 |
51485075 |
gtrhetr |
E |
March 19, 2019, 1:13 p.m. |
OK |
GNU C++14 |
TESTS |
71 |
249 |
105164800 |
|
3000 |
51301903 |
newbiegcz |
E |
March 14, 2019, 2:48 p.m. |
OK |
GNU C++14 |
TESTS |
71 |
295 |
137830400 |
|
3000 |
51321652 |
Newusers |
E |
March 15, 2019, 7:24 a.m. |
OK |
GNU C++14 |
TESTS |
71 |
296 |
140902400 |
|
3000 |
51218383 |
zsyzsy |
E |
March 12, 2019, 11:33 a.m. |
OK |
GNU C++14 |
TESTS |
71 |
296 |
145203200 |
|
3000 |
50769645 |
black_horse2014 |
E |
March 4, 2019, 3:13 a.m. |
OK |
GNU C++14 |
TESTS |
71 |
358 |
161689600 |
|
3000 |
50756395 |
vintage_Vlad_Makeev |
E |
March 3, 2019, 5:28 p.m. |
OK |
GNU C++14 |
TESTS |
71 |
498 |
145612800 |
|
3000 |
51280408 |
apiadu |
E |
March 14, 2019, 3:13 a.m. |
OK |
GNU C++14 |
TESTS |
71 |
655 |
72704000 |
|
3000 |
50811354 |
Shayan.P |
E |
March 5, 2019, 8:59 a.m. |
OK |
GNU C++17 |
TESTS |
71 |
31 |
204800 |
|
3000 |
51857990 |
Gio7_7_199 |
E |
March 26, 2019, 11:59 a.m. |
OK |
GNU C++17 |
TESTS |
71 |
31 |
1536000 |
|
3000 |
50876449 |
yzyyylx |
E |
March 6, 2019, 6:30 a.m. |
OK |
GNU C++17 |
TESTS |
71 |
31 |
1536000 |
|
3000 |
50876222 |
yzyyylx |
E |
March 6, 2019, 6:23 a.m. |
OK |
GNU C++17 |
TESTS |
71 |
31 |
1536000 |
|
3000 |
50976554 |
Charlene_Hao |
E |
March 7, 2019, 5:10 p.m. |
OK |
GNU C++17 |
TESTS |
71 |
46 |
10035200 |
|
3000 |
51349737 |
Benq |
E |
March 15, 2019, 8:51 p.m. |
OK |
GNU C++17 |
TESTS |
71 |
140 |
32256000 |
|
3000 |
68100346 |
vjudge4 |
E |
Jan. 3, 2020, 2:12 a.m. |
OK |
GNU C++17 |
TESTS |
71 |
140 |
81920000 |
|
3000 |
57848794 |
Nakagawa.Kanon |
E |
July 27, 2019, 12:17 p.m. |
OK |
GNU C++17 |
TESTS |
71 |
187 |
67891200 |
|
3000 |
50770364 |
Nakagawa.Kanon |
E |
March 4, 2019, 4:06 a.m. |
OK |
GNU C++17 |
TESTS |
71 |
265 |
136806400 |
|
3000 |
50769687 |
Nakagawa.Kanon |
E |
March 4, 2019, 3:16 a.m. |
OK |
GNU C++17 |
TESTS |
71 |
265 |
136806400 |
|
3000 |
62781597 |
TianPingXing |
E |
Oct. 17, 2019, 1:04 p.m. |
OK |
MS C++ |
TESTS |
71 |
31 |
1433600 |
|
3000 |
62856123 |
TianPingXing |
E |
Oct. 18, 2019, 9:17 a.m. |
OK |
MS C++ |
TESTS |
71 |
46 |
1433600 |
|
3000 |
62855984 |
TianZuiXing |
E |
Oct. 18, 2019, 9:15 a.m. |
OK |
MS C++ 2017 |
TESTS |
71 |
46 |
1228800 |
|
3000 |
68145581 |
user202729_ |
E |
Jan. 4, 2020, 4:08 a.m. |
OK |
PyPy 3 |
TESTS |
71 |
732 |
10444800 |
|
3000 |
remove filters
Back to search problems