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'Let f(x) be the sum of digits of a decimal number x . Find the smallest non-negative integer x such that f(x) + f(x + 1) + ... + f(x + k) = n . The first line contains one integer t ( 1 <= t <= 150 ) -- the number of test cases. Each test case consists of one line containing two integers n and k ( 1 <= n <= 150 , 0 <= k <= 9 ). For each test case, print one integer without leading zeroes. If there is no such x that f(x) + f(x + 1) + ... + f(x + k) = n , print -1 ; otherwise, print the minimum x meeting that constraint. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
85039419 |
Gassa |
E |
June 25, 2020, 4:05 p.m. |
OK |
D |
TESTS |
27 |
31 |
6656000 |
|
|
85063687 |
ruban |
E |
June 25, 2020, 6:11 p.m. |
OK |
Delphi |
TESTS |
27 |
296 |
146227200 |
|
|
85063648 |
ruban |
E |
June 25, 2020, 6:10 p.m. |
OK |
FPC |
TESTS |
27 |
467 |
145612800 |
|
|
85028009 |
rainboy |
E |
June 25, 2020, 3:40 p.m. |
OK |
GNU C11 |
TESTS |
27 |
46 |
3993600 |
|
|
85037273 |
shuyingte |
E |
June 25, 2020, 4 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
15 |
3993600 |
|
|
85050022 |
xish |
E |
June 25, 2020, 4:30 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
15 |
4096000 |
|
|
85037512 |
langdamao |
E |
June 25, 2020, 4:01 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
15 |
4096000 |
|
|
85030168 |
WYXkk_ |
E |
June 25, 2020, 3:44 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
15 |
4096000 |
|
|
85028016 |
Rainer1116 |
E |
June 25, 2020, 3:40 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
15 |
4096000 |
|
|
85082138 |
DD_BOND |
E |
June 26, 2020, 1:38 a.m. |
OK |
GNU C++11 |
TESTS |
27 |
15 |
4096000 |
|
|
85074040 |
kingofgeedorah |
E |
June 25, 2020, 8:58 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
30 |
4096000 |
|
|
85058767 |
Momo_xxx |
E |
June 25, 2020, 5:15 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
30 |
4096000 |
|
|
85038708 |
nakari1124 |
E |
June 25, 2020, 4:04 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
30 |
4096000 |
|
|
85075803 |
beacon_cwk |
E |
June 25, 2020, 9:43 p.m. |
OK |
GNU C++11 |
TESTS |
27 |
30 |
4096000 |
|
|
85035549 |
dph754132771 |
E |
June 25, 2020, 3:56 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
15 |
3686400 |
|
|
85067637 |
InaMinaDika |
E |
June 25, 2020, 7:04 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
30 |
3993600 |
|
|
85081730 |
shreyasbalakrishna19 |
E |
June 26, 2020, 1:23 a.m. |
OK |
GNU C++14 |
TESTS |
27 |
31 |
3686400 |
|
|
85066249 |
WaheguruAnurag |
E |
June 25, 2020, 6:45 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
31 |
3686400 |
|
|
85063462 |
pikel_rik |
E |
June 25, 2020, 6:08 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
31 |
3686400 |
|
|
85061485 |
geschmack_cr7 |
E |
June 25, 2020, 5:44 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
31 |
3686400 |
|
|
85058538 |
bukanYohandi |
E |
June 25, 2020, 5:12 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
31 |
3686400 |
|
|
85057512 |
Skadamoosh |
E |
June 25, 2020, 5:03 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
31 |
3686400 |
|
|
85056908 |
s34vv1nd |
E |
June 25, 2020, 4:59 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
31 |
3686400 |
|
|
85071127 |
vThejas |
E |
June 25, 2020, 8 p.m. |
OK |
GNU C++14 |
TESTS |
27 |
31 |
3686400 |
|
|
85055861 |
ytkn |
E |
June 25, 2020, 4:51 p.m. |
OK |
GNU C++17 |
TESTS |
27 |
30 |
3686400 |
|
|
85056938 |
yash.gupta224a |
E |
June 25, 2020, 4:59 p.m. |
OK |
GNU C++17 |
TESTS |
27 |
30 |
3686400 |
|
|
85051805 |
Messiah_10 |
E |
June 25, 2020, 4:34 p.m. |
OK |
GNU C++17 |
TESTS |
27 |
30 |
3788800 |
|
|
85081357 |
fishlicker |
E |
June 26, 2020, 1:09 a.m. |
OK |
GNU C++17 |
TESTS |
27 |
30 |
3788800 |
|
|
85041422 |
celestialcoder |
E |
June 25, 2020, 4:10 p.m. |
OK |
GNU C++17 |
TESTS |
27 |
30 |
3788800 |
|
|
85041176 |
zahra..d |
E |
June 25, 2020, 4:09 p.m. |
OK |
GNU C++17 |
TESTS |
27 |
30 |
3788800 |
|
|
85085595 |
KI-aq |
E |
June 26, 2020, 3:15 a.m. |
OK |
GNU C++17 |
TESTS |
27 |
30 |
3891200 |
|
|
85083728 |
nomight |
E |
June 26, 2020, 2:30 a.m. |
OK |
GNU C++17 |
TESTS |
27 |
31 |
3686400 |
|
|
85083103 |
huxch135 |
E |
June 26, 2020, 2:13 a.m. |
OK |
GNU C++17 |
TESTS |
27 |
31 |
3686400 |
|
|
85086035 |
Y_is_sunshine |
E |
June 26, 2020, 3:26 a.m. |
OK |
GNU C++17 |
TESTS |
27 |
31 |
3686400 |
|
|
85026543 |
noimi |
E |
June 25, 2020, 3:37 p.m. |
OK |
GNU C++17 (64) |
TESTS |
27 |
15 |
4608000 |
|
|
85047798 |
lightseba |
E |
June 25, 2020, 4:26 p.m. |
OK |
GNU C++17 (64) |
TESTS |
27 |
15 |
4608000 |
|
|
85061026 |
smax |
E |
June 25, 2020, 5:38 p.m. |
OK |
GNU C++17 (64) |
TESTS |
27 |
30 |
4608000 |
|
|
85055320 |
pratish1 |
E |
June 25, 2020, 4:48 p.m. |
OK |
GNU C++17 (64) |
TESTS |
27 |
30 |
4608000 |
|
|
85056333 |
iynaur87 |
E |
June 25, 2020, 4:54 p.m. |
OK |
GNU C++17 (64) |
TESTS |
27 |
30 |
4608000 |
|
|
85082612 |
tyler |
E |
June 26, 2020, 1:56 a.m. |
OK |
GNU C++17 (64) |
TESTS |
27 |
30 |
4608000 |
|
|
85081585 |
goatzyq |
E |
June 26, 2020, 1:18 a.m. |
OK |
GNU C++17 (64) |
TESTS |
27 |
30 |
4608000 |
|
|
85081435 |
wangluyao |
E |
June 26, 2020, 1:12 a.m. |
OK |
GNU C++17 (64) |
TESTS |
27 |
30 |
4608000 |
|
|
85068931 |
swapnil159 |
E |
June 25, 2020, 7:23 p.m. |
OK |
GNU C++17 (64) |
TESTS |
27 |
30 |
4608000 |
|
|
85062060 |
Prateek |
E |
June 25, 2020, 5:51 p.m. |
OK |
GNU C++17 (64) |
TESTS |
27 |
30 |
4608000 |
|
|
85084387 |
anhtaihsgs |
E |
June 26, 2020, 2:47 a.m. |
OK |
Java 11 |
TESTS |
27 |
171 |
24268800 |
|
|
85032887 |
mphillotry |
E |
June 25, 2020, 3:50 p.m. |
OK |
Java 11 |
TESTS |
27 |
171 |
24268800 |
|
|
85084244 |
anhtaihsgs |
E |
June 26, 2020, 2:43 a.m. |
OK |
Java 11 |
TESTS |
27 |
186 |
24268800 |
|
|
85025809 |
PizzaLovers007 |
E |
June 25, 2020, 3:35 p.m. |
OK |
Java 11 |
TESTS |
27 |
186 |
24371200 |
|
|
85017769 |
uwi |
E |
June 25, 2020, 3:21 p.m. |
OK |
Java 11 |
TESTS |
27 |
187 |
24473600 |
|
|
85046042 |
yehara |
E |
June 25, 2020, 4:21 p.m. |
OK |
Java 11 |
TESTS |
27 |
202 |
24883200 |
|
|
85073920 |
yvedryno |
E |
June 25, 2020, 8:56 p.m. |
OK |
Java 11 |
TESTS |
27 |
217 |
24883200 |
|
|
85058526 |
bobib |
E |
June 25, 2020, 5:12 p.m. |
OK |
Java 11 |
TESTS |
27 |
218 |
24883200 |
|
|
85042277 |
ZeyadKhattab |
E |
June 25, 2020, 4:12 p.m. |
OK |
Java 11 |
TESTS |
27 |
233 |
24883200 |
|
|
85060387 |
nirvana_rsc |
E |
June 25, 2020, 5:31 p.m. |
OK |
Java 11 |
TESTS |
27 |
233 |
24985600 |
|
|
85052273 |
1u_my_light |
E |
June 25, 2020, 4:34 p.m. |
OK |
Java 8 |
TESTS |
27 |
109 |
20889600 |
|
|
85078653 |
robinz62 |
E |
June 25, 2020, 11:24 p.m. |
OK |
Java 8 |
TESTS |
27 |
109 |
21094400 |
|
|
85075757 |
jxin31415 |
E |
June 25, 2020, 9:42 p.m. |
OK |
Java 8 |
TESTS |
27 |
109 |
21196800 |
|
|
85073631 |
Magikarp1 |
E |
June 25, 2020, 8:49 p.m. |
OK |
Java 8 |
TESTS |
27 |
109 |
21196800 |
|
|
85043774 |
holeguma |
E |
June 25, 2020, 4:16 p.m. |
OK |
Java 8 |
TESTS |
27 |
124 |
20889600 |
|
|
85063944 |
levi.blinder |
E |
June 25, 2020, 6:14 p.m. |
OK |
Java 8 |
TESTS |
27 |
124 |
20889600 |
|
|
85052595 |
TheSawan |
E |
June 25, 2020, 4:36 p.m. |
OK |
Java 8 |
TESTS |
27 |
155 |
20889600 |
|
|
85044892 |
pulkit14 |
E |
June 25, 2020, 4:19 p.m. |
OK |
Java 8 |
TESTS |
27 |
155 |
21401600 |
|
|
85058269 |
jerdno |
E |
June 25, 2020, 5:10 p.m. |
OK |
Java 8 |
TESTS |
27 |
170 |
21708800 |
|
|
85064045 |
out_of_the_box |
E |
June 25, 2020, 6:16 p.m. |
OK |
Java 8 |
TESTS |
27 |
171 |
21504000 |
|
|
85067825 |
Hakiobo |
E |
June 25, 2020, 7:07 p.m. |
OK |
Kotlin |
TESTS |
27 |
109 |
20889600 |
|
|
85070940 |
Hakiobo |
E |
June 25, 2020, 7:57 p.m. |
OK |
Kotlin |
TESTS |
27 |
124 |
20889600 |
|
|
85075375 |
Hakiobo |
E |
June 25, 2020, 9:31 p.m. |
OK |
Kotlin |
TESTS |
27 |
124 |
20889600 |
|
|
85072321 |
Hakiobo |
E |
June 25, 2020, 8:22 p.m. |
OK |
Kotlin |
TESTS |
27 |
124 |
20889600 |
|
|
85031390 |
Hakiobo |
E |
June 25, 2020, 3:47 p.m. |
OK |
Kotlin |
TESTS |
27 |
124 |
21196800 |
|
|
85034906 |
songsinger |
E |
June 25, 2020, 3:55 p.m. |
OK |
Kotlin |
TESTS |
27 |
124 |
21401600 |
|
|
85049681 |
koboshi |
E |
June 25, 2020, 4:30 p.m. |
OK |
Kotlin |
TESTS |
27 |
140 |
22220800 |
|
|
85058033 |
golions |
E |
June 25, 2020, 5:08 p.m. |
OK |
Kotlin |
TESTS |
27 |
155 |
22016000 |
|
|
85028329 |
EmK |
E |
June 25, 2020, 3:40 p.m. |
OK |
Mono C# |
TESTS |
27 |
62 |
8601600 |
|
|
85056810 |
kuuso |
E |
June 25, 2020, 4:58 p.m. |
OK |
Mono C# |
TESTS |
27 |
77 |
9830400 |
|
|
85042053 |
riantkb |
E |
June 25, 2020, 4:12 p.m. |
OK |
Mono C# |
TESTS |
27 |
78 |
8704000 |
|
|
85038203 |
hibatibati |
E |
June 25, 2020, 4:02 p.m. |
OK |
Mono C# |
TESTS |
27 |
78 |
13312000 |
|
|
85044066 |
tarattata1 |
E |
June 25, 2020, 4:17 p.m. |
OK |
MS C++ 2017 |
TESTS |
27 |
31 |
3993600 |
|
|
85057629 |
youx |
E |
June 25, 2020, 5:04 p.m. |
OK |
MS C++ 2017 |
TESTS |
27 |
31 |
3993600 |
|
|
85044709 |
otarra |
E |
June 25, 2020, 4:18 p.m. |
OK |
MS C++ 2017 |
TESTS |
27 |
62 |
3993600 |
|
|
85028423 |
pichulia |
E |
June 25, 2020, 3:40 p.m. |
OK |
MS C++ 2017 |
TESTS |
27 |
608 |
3993600 |
|
|
85029372 |
shehebe |
E |
June 25, 2020, 3:42 p.m. |
OK |
PyPy 2 |
TESTS |
27 |
186 |
26726400 |
|
|
85076674 |
chris-md |
E |
June 25, 2020, 10:09 p.m. |
OK |
PyPy 2 |
TESTS |
27 |
608 |
29593600 |
|
|
85071211 |
tobias.glimmerfors |
E |
June 25, 2020, 8:01 p.m. |
OK |
PyPy 3 |
TESTS |
27 |
155 |
20992000 |
|
|
85067932 |
meteorexx |
E |
June 25, 2020, 7:08 p.m. |
OK |
PyPy 3 |
TESTS |
27 |
155 |
20992000 |
|
|
85032054 |
chudy_lukasz1337 |
E |
June 25, 2020, 3:48 p.m. |
OK |
PyPy 3 |
TESTS |
27 |
155 |
21094400 |
|
|
85034654 |
lucifer1004 |
E |
June 25, 2020, 3:54 p.m. |
OK |
PyPy 3 |
TESTS |
27 |
155 |
22528000 |
|
|
85083684 |
anilsaxena |
E |
June 26, 2020, 2:29 a.m. |
OK |
PyPy 3 |
TESTS |
27 |
155 |
22835200 |
|
|
85083610 |
saral_technologies |
E |
June 26, 2020, 2:28 a.m. |
OK |
PyPy 3 |
TESTS |
27 |
155 |
22835200 |
|
|
85070104 |
qwertz73355a |
E |
June 25, 2020, 7:42 p.m. |
OK |
PyPy 3 |
TESTS |
27 |
156 |
22528000 |
|
|
85062645 |
Kavo_Chego |
E |
June 25, 2020, 5:57 p.m. |
OK |
PyPy 3 |
TESTS |
27 |
170 |
20992000 |
|
|
85056745 |
manish.17 |
E |
June 25, 2020, 4:57 p.m. |
OK |
PyPy 3 |
TESTS |
27 |
170 |
22528000 |
|
|
85028686 |
PhilTheFish |
E |
June 25, 2020, 3:41 p.m. |
OK |
PyPy 3 |
TESTS |
27 |
171 |
23040000 |
|
|
85064024 |
KA_Rma |
E |
June 25, 2020, 6:15 p.m. |
OK |
Python 3 |
TESTS |
27 |
124 |
6963200 |
|
|
85038528 |
ikatakos |
E |
June 25, 2020, 4:03 p.m. |
OK |
Python 3 |
TESTS |
27 |
124 |
6963200 |
|
|
85018933 |
ksun48 |
E |
June 25, 2020, 3:23 p.m. |
OK |
Python 3 |
TESTS |
27 |
124 |
7987200 |
|
|
85083340 |
sylvain.berube |
E |
June 26, 2020, 2:21 a.m. |
OK |
Python 3 |
TESTS |
27 |
140 |
6963200 |
|
|
85065568 |
nghethuat102 |
E |
June 25, 2020, 6:36 p.m. |
OK |
Python 3 |
TESTS |
27 |
140 |
7065600 |
|
|
85032827 |
chinerist |
E |
June 25, 2020, 3:50 p.m. |
OK |
Python 3 |
TESTS |
27 |
171 |
6963200 |
|
|
85082354 |
sudhirMTS |
E |
June 26, 2020, 1:47 a.m. |
OK |
Python 3 |
TESTS |
27 |
202 |
7065600 |
|
|
85057458 |
sh1194 |
E |
June 25, 2020, 5:03 p.m. |
OK |
Python 3 |
TESTS |
27 |
296 |
6963200 |
|
|
85057097 |
sh1194 |
E |
June 25, 2020, 5 p.m. |
OK |
Python 3 |
TESTS |
27 |
296 |
7065600 |
|
|
85056935 |
sh1194 |
E |
June 25, 2020, 4:59 p.m. |
OK |
Python 3 |
TESTS |
27 |
296 |
7065600 |
|
|
85025369 |
robostac |
E |
June 25, 2020, 3:35 p.m. |
OK |
Rust |
TESTS |
27 |
46 |
3891200 |
|
|
85057561 |
fatemender |
E |
June 25, 2020, 5:03 p.m. |
OK |
Rust |
TESTS |
27 |
46 |
4096000 |
|
|
85056672 |
rustafarian |
E |
June 25, 2020, 4:57 p.m. |
OK |
Rust |
TESTS |
27 |
46 |
6041600 |
|
|
85029162 |
sansen |
E |
June 25, 2020, 3:42 p.m. |
OK |
Rust |
TESTS |
27 |
124 |
4096000 |
|
|
remove filters
Back to search problems