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"You are given a decimal representation of an integer x without leading zeros. You have to perform the following reduction on it exactly once: take two neighboring digits in x and replace them with their sum without leading zeros (if the sum is 0 , it's represented as a single 0 ). For example, if x = 10057 , the possible reductions are: What's the largest number that can be obtained? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. Each testcase consists of a single integer x ( 10 <= x < 10^{200000} ). x doesn't contain leading zeros. The total length of the decimal representations of x over all testcases doesn't exceed 2 cdot 10^5 . For each testcase, print a single integer -- the largest number that can be obtained after the reduction is applied exactly once. The number should not contain leading zeros. The first testcase of the example is already explained in the statement. In the second testcase, there is only one possible reduction: the first and the second digits. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
143030203 |
parasmahour15 |
B |
Jan. 16, 2022, 5:38 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
18 |
155 |
13209600 |
|
|
143020805 |
ssvb |
B |
Jan. 16, 2022, 4:58 p.m. |
OK |
D |
TESTS |
18 |
15 |
4198400 |
|
|
143032785 |
IGC17 |
B |
Jan. 16, 2022, 6:01 p.m. |
OK |
GNU C11 |
TESTS |
18 |
15 |
1024000 |
|
|
143033061 |
IGC17 |
B |
Jan. 16, 2022, 6:04 p.m. |
OK |
GNU C11 |
TESTS |
18 |
15 |
1024000 |
|
|
143021439 |
Shreenabh |
B |
Jan. 16, 2022, 4:58 p.m. |
OK |
GNU C11 |
TESTS |
18 |
46 |
204800 |
|
|
143024981 |
rainboy |
B |
Jan. 16, 2022, 5:07 p.m. |
OK |
GNU C11 |
TESTS |
18 |
46 |
204800 |
|
|
143020699 |
urvish_pujara |
B |
Jan. 16, 2022, 4:58 p.m. |
OK |
GNU C11 |
TESTS |
18 |
124 |
204800 |
|
|
143030345 |
Sereny |
B |
Jan. 16, 2022, 5:40 p.m. |
OK |
GNU C11 |
TESTS |
18 |
748 |
204800 |
|
|
143053065 |
HHU_fl |
B |
Jan. 17, 2022, 3:42 a.m. |
OK |
GNU C11 |
TESTS |
18 |
748 |
204800 |
|
|
143035832 |
Murli_33 |
B |
Jan. 16, 2022, 6:35 p.m. |
OK |
GNU C11 |
TESTS |
18 |
748 |
1024000 |
|
|
143046233 |
whilekim1 |
B |
Jan. 17, 2022, 1:36 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
204800 |
|
|
143054718 |
Lord-Phantom-city |
B |
Jan. 17, 2022, 4:04 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
204800 |
|
|
143058483 |
nitvjudge1 |
B |
Jan. 17, 2022, 4:46 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
204800 |
|
|
143048206 |
andychen2012 |
B |
Jan. 17, 2022, 2:23 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
204800 |
|
|
143066720 |
OngOng |
B |
Jan. 17, 2022, 6:02 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
512000 |
|
|
143061449 |
ViL_GAX |
B |
Jan. 17, 2022, 5:19 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
512000 |
|
|
143055880 |
abhinav04 |
B |
Jan. 17, 2022, 4:19 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
512000 |
|
|
143045907 |
soumya21 |
B |
Jan. 17, 2022, 1:26 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
512000 |
|
|
143044048 |
wfjz |
B |
Jan. 17, 2022, 12:13 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
512000 |
|
|
143040040 |
Valters07 |
B |
Jan. 16, 2022, 9:11 p.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
512000 |
|
|
143027800 |
hritikritesh |
B |
Jan. 16, 2022, 5:21 p.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
409600 |
|
|
143060906 |
omkar3388 |
B |
Jan. 17, 2022, 5:14 a.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
512000 |
|
|
143059732 |
wrc |
B |
Jan. 17, 2022, 5:01 a.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
512000 |
|
|
143062659 |
isnjb27 |
B |
Jan. 17, 2022, 5:29 a.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
512000 |
|
|
143064329 |
aryamansinghk |
B |
Jan. 17, 2022, 5:43 a.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
512000 |
|
|
143064477 |
Rafio |
B |
Jan. 17, 2022, 5:44 a.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
512000 |
|
|
143061621 |
v1rtual_1ntell1jence |
B |
Jan. 17, 2022, 5:20 a.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
512000 |
|
|
143061374 |
Yuvaraj712uv |
B |
Jan. 17, 2022, 5:18 a.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
512000 |
|
|
143063563 |
lalvikas83 |
B |
Jan. 17, 2022, 5:37 a.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
512000 |
|
|
143063655 |
Ayush479 |
B |
Jan. 17, 2022, 5:37 a.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
512000 |
|
|
143023783 |
Toxel |
B |
Jan. 16, 2022, 5:03 p.m. |
OK |
GNU C++17 (64) |
TESTS |
18 |
15 |
204800 |
|
|
143043468 |
w23c3c3 |
B |
Jan. 16, 2022, 11:45 p.m. |
OK |
GNU C++17 (64) |
TESTS |
18 |
15 |
204800 |
|
|
143055575 |
mandeeppunia08 |
B |
Jan. 17, 2022, 4:15 a.m. |
OK |
GNU C++17 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143066672 |
alif_cse_ju |
B |
Jan. 17, 2022, 6:02 a.m. |
OK |
GNU C++17 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143062841 |
nikhilrana884 |
B |
Jan. 17, 2022, 5:30 a.m. |
OK |
GNU C++17 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143054824 |
rohanop |
B |
Jan. 17, 2022, 4:06 a.m. |
OK |
GNU C++17 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143054467 |
aro_ekbar |
B |
Jan. 17, 2022, 4:01 a.m. |
OK |
GNU C++17 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143049253 |
cherish. |
B |
Jan. 17, 2022, 2:44 a.m. |
OK |
GNU C++17 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143046849 |
Altsareverybad |
B |
Jan. 17, 2022, 1:52 a.m. |
OK |
GNU C++17 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143046249 |
Ayoub_Khasawneh |
B |
Jan. 17, 2022, 1:36 a.m. |
OK |
GNU C++17 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143045608 |
noname___ |
B |
Jan. 17, 2022, 1:17 a.m. |
OK |
GNU C++20 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143043589 |
Ajam |
B |
Jan. 16, 2022, 11:51 p.m. |
OK |
GNU C++20 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143043157 |
dimasidorenko |
B |
Jan. 16, 2022, 11:30 p.m. |
OK |
GNU C++20 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143045681 |
noname___ |
B |
Jan. 17, 2022, 1:19 a.m. |
OK |
GNU C++20 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143048045 |
gqf123 |
B |
Jan. 17, 2022, 2:20 a.m. |
OK |
GNU C++20 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143048612 |
Applepi_228 |
B |
Jan. 17, 2022, 2:31 a.m. |
OK |
GNU C++20 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143052014 |
rohit_00004 |
B |
Jan. 17, 2022, 3:28 a.m. |
OK |
GNU C++20 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143052509 |
___Rain |
B |
Jan. 17, 2022, 3:35 a.m. |
OK |
GNU C++20 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143063043 |
Misbaul_Hasan |
B |
Jan. 17, 2022, 5:32 a.m. |
OK |
GNU C++20 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143064365 |
daskjj44 |
B |
Jan. 17, 2022, 5:43 a.m. |
OK |
GNU C++20 (64) |
TESTS |
18 |
15 |
512000 |
|
|
143049370 |
graceoflives |
B |
Jan. 17, 2022, 2:46 a.m. |
OK |
Go |
TESTS |
18 |
46 |
2355200 |
|
|
143049333 |
graceoflives |
B |
Jan. 17, 2022, 2:45 a.m. |
OK |
Go |
TESTS |
18 |
46 |
2355200 |
|
|
143042269 |
1e9y |
B |
Jan. 16, 2022, 10:46 p.m. |
OK |
Go |
TESTS |
18 |
61 |
2662400 |
|
|
143050477 |
tovenja |
B |
Jan. 17, 2022, 3:05 a.m. |
OK |
Go |
TESTS |
18 |
62 |
1331200 |
|
|
143021596 |
dwoolley3 |
B |
Jan. 16, 2022, 4:59 p.m. |
OK |
Java 11 |
TESTS |
18 |
186 |
0 |
|
|
143026953 |
NoobAk |
B |
Jan. 16, 2022, 5:16 p.m. |
OK |
Java 11 |
TESTS |
18 |
202 |
0 |
|
|
143056335 |
MindSlayer |
B |
Jan. 17, 2022, 4:24 a.m. |
OK |
Java 11 |
TESTS |
18 |
202 |
0 |
|
|
143056240 |
dhruvil_8803 |
B |
Jan. 17, 2022, 4:23 a.m. |
OK |
Java 11 |
TESTS |
18 |
202 |
0 |
|
|
143046946 |
Kumaresh |
B |
Jan. 17, 2022, 1:54 a.m. |
OK |
Java 11 |
TESTS |
18 |
202 |
0 |
|
|
143042649 |
Andwerp |
B |
Jan. 16, 2022, 11:04 p.m. |
OK |
Java 11 |
TESTS |
18 |
202 |
0 |
|
|
143025848 |
Wuya |
B |
Jan. 16, 2022, 5:11 p.m. |
OK |
Java 11 |
TESTS |
18 |
202 |
0 |
|
|
143023955 |
iamsoumik |
B |
Jan. 16, 2022, 5:04 p.m. |
OK |
Java 11 |
TESTS |
18 |
202 |
0 |
|
|
143021872 |
saikat021 |
B |
Jan. 16, 2022, 4:59 p.m. |
OK |
Java 11 |
TESTS |
18 |
202 |
0 |
|
|
143048663 |
starrylight |
B |
Jan. 17, 2022, 2:32 a.m. |
OK |
Java 11 |
TESTS |
18 |
217 |
0 |
|
|
143033503 |
madhav2800 |
B |
Jan. 16, 2022, 6:08 p.m. |
OK |
Java 8 |
TESTS |
18 |
109 |
0 |
|
|
143033166 |
Chandler |
B |
Jan. 16, 2022, 6:05 p.m. |
OK |
Java 8 |
TESTS |
18 |
109 |
0 |
|
|
143036161 |
_Gupta_JI_ |
B |
Jan. 16, 2022, 6:39 p.m. |
OK |
Java 8 |
TESTS |
18 |
109 |
0 |
|
|
143049111 |
zxz_xmx |
B |
Jan. 17, 2022, 2:41 a.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
|
143047515 |
arpit31 |
B |
Jan. 17, 2022, 2:08 a.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
|
143034328 |
Unrated_Pritam |
B |
Jan. 16, 2022, 6:17 p.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
|
143041965 |
Dark_Knight_07 |
B |
Jan. 16, 2022, 10:31 p.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
|
143058851 |
RONIN786 |
B |
Jan. 17, 2022, 4:50 a.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
|
143056850 |
AnshX |
B |
Jan. 17, 2022, 4:30 a.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
|
143051080 |
ved20 |
B |
Jan. 17, 2022, 3:14 a.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
|
143028937 |
SlavaG |
B |
Jan. 16, 2022, 5:29 p.m. |
OK |
Kotlin 1.5 |
TESTS |
18 |
264 |
0 |
|
|
143028425 |
SlavaG |
B |
Jan. 16, 2022, 5:25 p.m. |
OK |
Kotlin 1.5 |
TESTS |
18 |
296 |
0 |
|
|
143050192 |
RealStarlight |
B |
Jan. 17, 2022, 3 a.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
15 |
819200 |
|
|
143040371 |
Ayman_Attili26 |
B |
Jan. 16, 2022, 9:23 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
31 |
512000 |
|
|
143031979 |
whiteReboot |
B |
Jan. 16, 2022, 5:53 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
31 |
716800 |
|
|
143049482 |
whswhswhs |
B |
Jan. 17, 2022, 2:48 a.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
31 |
819200 |
|
|
143026302 |
fatant |
B |
Jan. 16, 2022, 5:13 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
46 |
716800 |
|
|
143024822 |
dicobraz |
B |
Jan. 16, 2022, 5:07 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
46 |
819200 |
|
|
143062393 |
shuitishashou |
B |
Jan. 17, 2022, 5:26 a.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
62 |
716800 |
|
|
143027353 |
Tangerine |
B |
Jan. 16, 2022, 5:18 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
62 |
716800 |
|
|
143025616 |
Qworl |
B |
Jan. 16, 2022, 5:10 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
62 |
1024000 |
|
|
143047850 |
F_Rio |
B |
Jan. 17, 2022, 2:16 a.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
951 |
7987200 |
|
|
143022819 |
ansergeyg |
B |
Jan. 16, 2022, 5:01 p.m. |
OK |
.NET Core C# |
TESTS |
18 |
109 |
4505600 |
|
|
143030768 |
rsFalse |
B |
Jan. 16, 2022, 5:43 p.m. |
OK |
Perl |
TESTS |
18 |
717 |
43929600 |
|
|
143019580 |
chaosagent |
B |
Jan. 16, 2022, 3:44 p.m. |
OK |
PyPy 2 |
TESTS |
18 |
280 |
5939200 |
|
|
143027815 |
Aestroix |
B |
Jan. 16, 2022, 5:21 p.m. |
OK |
PyPy 3 |
TESTS |
18 |
202 |
12595200 |
|
|
143043869 |
revdoor |
B |
Jan. 17, 2022, 12:05 a.m. |
OK |
PyPy 3 |
TESTS |
18 |
249 |
10547200 |
|
|
143027775 |
NAVI_Perfecto |
B |
Jan. 16, 2022, 5:21 p.m. |
OK |
PyPy 3 |
TESTS |
18 |
264 |
19251200 |
|
|
143028700 |
Ayushman_123 |
B |
Jan. 16, 2022, 5:27 p.m. |
OK |
PyPy 3 |
TESTS |
18 |
265 |
8601600 |
|
|
143057858 |
ArjitShrivastava |
B |
Jan. 17, 2022, 4:40 a.m. |
OK |
PyPy 3 |
TESTS |
18 |
295 |
10854400 |
|
|
143022383 |
Mansurbek |
B |
Jan. 16, 2022, 5 p.m. |
OK |
PyPy 3 |
TESTS |
18 |
311 |
7270400 |
|
|
143051392 |
kwin |
B |
Jan. 17, 2022, 3:19 a.m. |
OK |
PyPy 3 |
TESTS |
18 |
327 |
6041600 |
|
|
143065177 |
coder_941 |
B |
Jan. 17, 2022, 5:51 a.m. |
OK |
PyPy 3 |
TESTS |
18 |
327 |
8601600 |
|
|
143028944 |
s1997 |
B |
Jan. 16, 2022, 5:29 p.m. |
OK |
PyPy 3 |
TESTS |
18 |
342 |
8704000 |
|
|
143055558 |
Dre_Russ |
B |
Jan. 17, 2022, 4:15 a.m. |
OK |
PyPy 3 |
TESTS |
18 |
342 |
9932800 |
|
|
143030640 |
MistaAsh |
B |
Jan. 16, 2022, 5:42 p.m. |
OK |
PyPy 3-64 |
TESTS |
18 |
140 |
9625600 |
|
|
143063666 |
kaustavshouvik |
B |
Jan. 17, 2022, 5:37 a.m. |
OK |
PyPy 3-64 |
TESTS |
18 |
155 |
8192000 |
|
|
143033758 |
NKUCristiano |
B |
Jan. 16, 2022, 6:11 p.m. |
OK |
PyPy 3-64 |
TESTS |
18 |
155 |
13516800 |
|
|
143044214 |
kazamasmile |
B |
Jan. 17, 2022, 12:22 a.m. |
OK |
PyPy 3-64 |
TESTS |
18 |
156 |
12595200 |
|
|
143029914 |
Multibala |
B |
Jan. 16, 2022, 5:36 p.m. |
OK |
PyPy 3-64 |
TESTS |
18 |
171 |
15360000 |
|
|
143025244 |
AbnerShen |
B |
Jan. 16, 2022, 5:08 p.m. |
OK |
PyPy 3-64 |
TESTS |
18 |
202 |
15155200 |
|
|
143058068 |
mayank35 |
B |
Jan. 17, 2022, 4:42 a.m. |
OK |
PyPy 3-64 |
TESTS |
18 |
233 |
15360000 |
|
|
143047841 |
sleepy-lynx |
B |
Jan. 17, 2022, 2:15 a.m. |
OK |
PyPy 3-64 |
TESTS |
18 |
265 |
14028800 |
|
|
143029990 |
AP_XD |
B |
Jan. 16, 2022, 5:37 p.m. |
OK |
PyPy 3-64 |
TESTS |
18 |
280 |
10035200 |
|
|
143044376 |
bmhung17903 |
B |
Jan. 17, 2022, 12:29 a.m. |
OK |
PyPy 3-64 |
TESTS |
18 |
280 |
10444800 |
|
|
143026008 |
OLOGY |
B |
Jan. 16, 2022, 5:11 p.m. |
OK |
Python 2 |
TESTS |
18 |
140 |
2867200 |
|
|
143023886 |
vin896 |
B |
Jan. 16, 2022, 5:04 p.m. |
OK |
Python 2 |
TESTS |
18 |
389 |
3686400 |
|
|
143043369 |
ervin5 |
B |
Jan. 16, 2022, 11:41 p.m. |
OK |
Python 3 |
TESTS |
18 |
155 |
10956800 |
|
|
143027250 |
Orn0 |
B |
Jan. 16, 2022, 5:17 p.m. |
OK |
Python 3 |
TESTS |
18 |
156 |
512000 |
|
|
143029270 |
eugalt |
B |
Jan. 16, 2022, 5:31 p.m. |
OK |
Python 3 |
TESTS |
18 |
156 |
3584000 |
|
|
143034967 |
geppoz |
B |
Jan. 16, 2022, 6:24 p.m. |
OK |
Python 3 |
TESTS |
18 |
170 |
512000 |
|
|
143041144 |
J0o. |
B |
Jan. 16, 2022, 9:52 p.m. |
OK |
Python 3 |
TESTS |
18 |
171 |
307200 |
|
|
143041022 |
J0o. |
B |
Jan. 16, 2022, 9:48 p.m. |
OK |
Python 3 |
TESTS |
18 |
171 |
307200 |
|
|
143035285 |
Bishwanath |
B |
Jan. 16, 2022, 6:28 p.m. |
OK |
Python 3 |
TESTS |
18 |
171 |
512000 |
|
|
143028858 |
robin8107 |
B |
Jan. 16, 2022, 5:28 p.m. |
OK |
Python 3 |
TESTS |
18 |
171 |
512000 |
|
|
143024475 |
dex_tver |
B |
Jan. 16, 2022, 5:05 p.m. |
OK |
Python 3 |
TESTS |
18 |
171 |
614400 |
|
|
143042157 |
rfi-cfif |
B |
Jan. 16, 2022, 10:41 p.m. |
OK |
Python 3 |
TESTS |
18 |
171 |
819200 |
|
|
remove filters
Back to search problems