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'The sum of digits of a non-negative integer a is the result of summing up its digits together when written in the decimal system. For example, the sum of digits of 123 is 6 and the sum of digits of 10 is 1 . In a formal way, the sum of digits of displaystyle a= sum_{i=0}^{ infty} a_i cdot 10^i , where 0 <= q a_i <= q 9 , is defined as displaystyle sum_{i=0}^{ infty}{a_i} . Given an integer n , find two non-negative integers x and y which satisfy the following conditions. It can be shown that such x and y always exist. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10 ,000 ). Each test case consists of a single integer n ( 1 <= q n <= q 10^9 ) For each test case, print two integers x and y . If there are multiple answers, print any. In the second test case, the sum of digits of 67 and the sum of digits of 94 are both 13 . In the third test case, the sum of digits of 60 is 6 , and the sum of digits of 7 is 7 . '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
192984065 |
PavolKoman |
B |
Feb. 9, 2023, 7:36 p.m. |
OK |
C# 10 |
TESTS |
10 |
93 |
1945600 |
|
|
193005079 |
bluemegane |
B |
Feb. 10, 2023, 2:16 a.m. |
OK |
C# 8 |
TESTS |
11 |
156 |
3174400 |
|
|
192973206 |
Digant_Sheladiya |
B |
Feb. 9, 2023, 6:02 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
10 |
187 |
0 |
|
|
193002674 |
Awesome3.14 |
B |
Feb. 10, 2023, 1:16 a.m. |
OK |
D |
TESTS |
11 |
31 |
204800 |
|
|
192973041 |
NenadDapic |
B |
Feb. 9, 2023, 6:01 p.m. |
OK |
FPC |
TESTS |
10 |
46 |
0 |
|
|
192994372 |
edwardnvv57k |
B |
Feb. 9, 2023, 9:54 p.m. |
OK |
GNU C11 |
TESTS |
10 |
31 |
0 |
|
|
192986584 |
sanjay77 |
B |
Feb. 9, 2023, 8:03 p.m. |
OK |
GNU C11 |
TESTS |
10 |
62 |
0 |
|
|
192989352 |
Kritang |
B |
Feb. 9, 2023, 8:37 p.m. |
OK |
GNU C11 |
TESTS |
10 |
62 |
0 |
|
|
193002085 |
dryu1201 |
B |
Feb. 10, 2023, 1:02 a.m. |
OK |
GNU C11 |
TESTS |
11 |
62 |
0 |
|
|
193010635 |
sliverthu |
B |
Feb. 10, 2023, 3:53 a.m. |
OK |
GNU C11 |
TESTS |
11 |
62 |
0 |
|
|
192966063 |
iffatul_anon |
B |
Feb. 9, 2023, 5:20 p.m. |
OK |
GNU C11 |
TESTS |
10 |
62 |
0 |
|
|
192979786 |
Mushfiqur_ |
B |
Feb. 9, 2023, 6:55 p.m. |
OK |
GNU C11 |
TESTS |
10 |
62 |
0 |
|
|
192960665 |
Moka50 |
B |
Feb. 9, 2023, 4:32 p.m. |
OK |
GNU C11 |
TESTS |
10 |
62 |
8908800 |
|
|
192965790 |
1419__ |
B |
Feb. 9, 2023, 5:19 p.m. |
OK |
GNU C11 |
TESTS |
10 |
77 |
0 |
|
|
192980304 |
C223056_farhad |
B |
Feb. 9, 2023, 7 p.m. |
OK |
GNU C11 |
TESTS |
10 |
77 |
0 |
|
|
193005077 |
madhavan_raja |
B |
Feb. 10, 2023, 2:16 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
|
193004743 |
NgTrung2217 |
B |
Feb. 10, 2023, 2:09 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
|
193004158 |
Reisen_ |
B |
Feb. 10, 2023, 1:56 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
|
193002975 |
AreUok |
B |
Feb. 10, 2023, 1:25 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
|
193002932 |
zixiangcode |
B |
Feb. 10, 2023, 1:23 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
|
193001977 |
LightBrand99 |
B |
Feb. 10, 2023, 12:59 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
|
193020368 |
Mistouch |
B |
Feb. 10, 2023, 5:58 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
|
193019741 |
luogu_bot5 |
B |
Feb. 10, 2023, 5:51 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
|
193009163 |
huyhoangk36chv |
B |
Feb. 10, 2023, 3:28 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
|
193008056 |
hydrogen_hy |
B |
Feb. 10, 2023, 3:11 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
|
193009408 |
b_i_b |
B |
Feb. 10, 2023, 3:32 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
|
193013806 |
LeNcyer |
B |
Feb. 10, 2023, 4:39 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
|
193015222 |
ashes.m2001 |
B |
Feb. 10, 2023, 4:58 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
|
193017354 |
Shengmuqian |
B |
Feb. 10, 2023, 5:23 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
|
193017945 |
hmtu117 |
B |
Feb. 10, 2023, 5:31 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
|
193018569 |
ASM_ATIKUR |
B |
Feb. 10, 2023, 5:38 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
|
193008503 |
JustACommonMan |
B |
Feb. 10, 2023, 3:18 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
|
193008033 |
ankurbhadauria |
B |
Feb. 10, 2023, 3:10 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
|
193007724 |
manav_282 |
B |
Feb. 10, 2023, 3:05 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
|
193007465 |
thisisrkrkrk |
B |
Feb. 10, 2023, 3 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
|
193005119 |
xioachou |
B |
Feb. 10, 2023, 2:17 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
15 |
0 |
|
|
193020430 |
BuptNorthRemembers |
B |
Feb. 10, 2023, 5:58 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
15 |
0 |
|
|
193017219 |
stop |
B |
Feb. 10, 2023, 5:22 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
15 |
0 |
|
|
193010532 |
scotchtape13 |
B |
Feb. 10, 2023, 3:51 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
15 |
0 |
|
|
193008119 |
FeathBow |
B |
Feb. 10, 2023, 3:12 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
15 |
0 |
|
|
193004064 |
yl_neo |
B |
Feb. 10, 2023, 1:54 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
15 |
0 |
|
|
192992677 |
mesbah19 |
B |
Feb. 9, 2023, 9:26 p.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
0 |
|
|
192987462 |
Monir |
B |
Feb. 9, 2023, 8:14 p.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
0 |
|
|
192987018 |
KevinyWu |
B |
Feb. 9, 2023, 8:08 p.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
0 |
|
|
192982763 |
Mohit. |
B |
Feb. 9, 2023, 7:23 p.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
0 |
|
|
193003398 |
abhi3001 |
B |
Feb. 10, 2023, 1:37 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
0 |
|
|
193005684 |
K-423 |
B |
Feb. 10, 2023, 2:29 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
0 |
|
|
193009119 |
Uoyue |
B |
Feb. 10, 2023, 3:27 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
0 |
|
|
193018371 |
Payxtl |
B |
Feb. 10, 2023, 5:36 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
15 |
0 |
|
|
193018736 |
Pikachu0123 |
B |
Feb. 10, 2023, 5:40 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
15 |
0 |
|
|
193018739 |
Yanz |
B |
Feb. 10, 2023, 5:40 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
15 |
0 |
|
|
193019572 |
rahulhind |
B |
Feb. 10, 2023, 5:49 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
15 |
0 |
|
|
193017259 |
chatterjee_triparno |
B |
Feb. 10, 2023, 5:22 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
15 |
0 |
|
|
193017341 |
Pikachu0123 |
B |
Feb. 10, 2023, 5:23 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
15 |
0 |
|
|
193017625 |
LostPrince |
B |
Feb. 10, 2023, 5:27 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
15 |
0 |
|
|
193008066 |
HMETAO |
B |
Feb. 10, 2023, 3:11 a.m. |
OK |
Java 11 |
TESTS |
11 |
186 |
0 |
|
|
193007132 |
HMETAO |
B |
Feb. 10, 2023, 2:54 a.m. |
OK |
Java 11 |
TESTS |
11 |
187 |
0 |
|
|
193004043 |
HMETAO |
B |
Feb. 10, 2023, 1:53 a.m. |
OK |
Java 11 |
TESTS |
11 |
187 |
0 |
|
|
193005549 |
Reacher01 |
B |
Feb. 10, 2023, 2:26 a.m. |
OK |
Java 11 |
TESTS |
11 |
202 |
40755200 |
|
|
192961199 |
HMETAO |
B |
Feb. 9, 2023, 4:33 p.m. |
OK |
Java 11 |
TESTS |
10 |
218 |
0 |
|
|
192965704 |
vijender_8601 |
B |
Feb. 9, 2023, 5:18 p.m. |
OK |
Java 11 |
TESTS |
10 |
218 |
0 |
|
|
193000146 |
hassanU |
B |
Feb. 10, 2023, 12:07 a.m. |
OK |
Java 11 |
TESTS |
11 |
233 |
0 |
|
|
192967535 |
LoudSilence |
B |
Feb. 9, 2023, 5:26 p.m. |
OK |
Java 11 |
TESTS |
10 |
233 |
0 |
|
|
192965164 |
Extradict |
B |
Feb. 9, 2023, 5:17 p.m. |
OK |
Java 11 |
TESTS |
10 |
264 |
409600 |
|
|
192996551 |
Hinnawi24 |
B |
Feb. 9, 2023, 10:35 p.m. |
OK |
Java 11 |
TESTS |
10 |
265 |
0 |
|
|
192968631 |
Mawina |
B |
Feb. 9, 2023, 5:32 p.m. |
OK |
Java 17 |
TESTS |
10 |
187 |
614400 |
|
|
193004214 |
kkz666 |
B |
Feb. 10, 2023, 1:57 a.m. |
OK |
Java 17 |
TESTS |
11 |
217 |
819200 |
|
|
192997657 |
sarvesh_bawari |
B |
Feb. 9, 2023, 11 p.m. |
OK |
Java 17 |
TESTS |
10 |
218 |
204800 |
|
|
192987508 |
coder0687 |
B |
Feb. 9, 2023, 8:14 p.m. |
OK |
Java 17 |
TESTS |
10 |
218 |
819200 |
|
|
192995230 |
BucketOfNubbins |
B |
Feb. 9, 2023, 10:09 p.m. |
OK |
Java 17 |
TESTS |
10 |
233 |
921600 |
|
|
192977336 |
maurya.rahul682 |
B |
Feb. 9, 2023, 6:33 p.m. |
OK |
Java 17 |
TESTS |
10 |
249 |
512000 |
|
|
192977538 |
aritrasen12345 |
B |
Feb. 9, 2023, 6:35 p.m. |
OK |
Java 17 |
TESTS |
10 |
280 |
409600 |
|
|
192968078 |
cosefordes |
B |
Feb. 9, 2023, 5:29 p.m. |
OK |
Java 17 |
TESTS |
10 |
280 |
716800 |
|
|
192999106 |
Rodolphe |
B |
Feb. 9, 2023, 11:37 p.m. |
OK |
Java 17 |
TESTS |
10 |
280 |
921600 |
|
|
192961895 |
Saurabh_jayaswal |
B |
Feb. 9, 2023, 4:34 p.m. |
OK |
Java 17 |
TESTS |
10 |
295 |
307200 |
|
|
193010169 |
reputation_tv |
B |
Feb. 10, 2023, 3:45 a.m. |
OK |
Java 8 |
TESTS |
11 |
108 |
0 |
|
|
193020527 |
vkukretiwork |
B |
Feb. 10, 2023, 5:59 a.m. |
OK |
Java 8 |
TESTS |
11 |
109 |
0 |
|
|
192995751 |
raj_shahh |
B |
Feb. 9, 2023, 10:19 p.m. |
OK |
Java 8 |
TESTS |
10 |
109 |
0 |
|
|
192992199 |
lpychemistry |
B |
Feb. 9, 2023, 9:18 p.m. |
OK |
Java 8 |
TESTS |
10 |
109 |
0 |
|
|
192992081 |
Akarsh2810 |
B |
Feb. 9, 2023, 9:16 p.m. |
OK |
Java 8 |
TESTS |
10 |
109 |
0 |
|
|
192982033 |
abdallahsameh |
B |
Feb. 9, 2023, 7:16 p.m. |
OK |
Java 8 |
TESTS |
10 |
109 |
0 |
|
|
192967130 |
BhargavModha |
B |
Feb. 9, 2023, 5:24 p.m. |
OK |
Java 8 |
TESTS |
10 |
109 |
0 |
|
|
193007455 |
one_line |
B |
Feb. 10, 2023, 3 a.m. |
OK |
Java 8 |
TESTS |
11 |
124 |
0 |
|
|
193003890 |
-crazy_coder- |
B |
Feb. 10, 2023, 1:50 a.m. |
OK |
Java 8 |
TESTS |
11 |
124 |
0 |
|
|
192997583 |
IanISam |
B |
Feb. 9, 2023, 10:59 p.m. |
OK |
Java 8 |
TESTS |
10 |
124 |
0 |
|
|
192982813 |
reosfire |
B |
Feb. 9, 2023, 7:24 p.m. |
OK |
Kotlin 1.7 |
TESTS |
10 |
436 |
8192000 |
|
|
192962251 |
Labrynth |
B |
Feb. 9, 2023, 4:34 p.m. |
OK |
MS C++ 2017 |
TESTS |
10 |
31 |
0 |
|
|
193005934 |
moka27 |
B |
Feb. 10, 2023, 2:33 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
62 |
0 |
|
|
193005638 |
moka27 |
B |
Feb. 10, 2023, 2:28 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
62 |
0 |
|
|
193002682 |
ishybee |
B |
Feb. 10, 2023, 1:16 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
77 |
0 |
|
|
192961369 |
waleedalaa511 |
B |
Feb. 9, 2023, 4:33 p.m. |
OK |
MS C++ 2017 |
TESTS |
10 |
77 |
102400 |
|
|
192965966 |
shobonvip |
B |
Feb. 9, 2023, 5:19 p.m. |
OK |
PyPy 3 |
TESTS |
10 |
140 |
4198400 |
|
|
192960248 |
IceKnight1093 |
B |
Feb. 9, 2023, 4:32 p.m. |
OK |
PyPy 3 |
TESTS |
10 |
202 |
8499200 |
|
|
192959808 |
Mohamed_Hamed |
B |
Feb. 9, 2023, 4:31 p.m. |
OK |
PyPy 3 |
TESTS |
10 |
233 |
8499200 |
|
|
192973209 |
AhsanHabib |
B |
Feb. 9, 2023, 6:02 p.m. |
OK |
PyPy 3 |
TESTS |
10 |
295 |
5120000 |
|
|
192976977 |
shauryajain1204 |
B |
Feb. 9, 2023, 6:30 p.m. |
OK |
PyPy 3 |
TESTS |
10 |
296 |
7168000 |
|
|
192982402 |
tobby125 |
B |
Feb. 9, 2023, 7:20 p.m. |
OK |
PyPy 3 |
TESTS |
10 |
311 |
5734400 |
|
|
193014399 |
VnPower |
B |
Feb. 10, 2023, 4:47 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
311 |
7372800 |
|
|
192967105 |
Has-Borutocu |
B |
Feb. 9, 2023, 5:24 p.m. |
OK |
PyPy 3 |
TESTS |
10 |
312 |
6860800 |
|
|
193010714 |
sidsrf |
B |
Feb. 10, 2023, 3:54 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
92 |
6348800 |
|
|
192995845 |
EpicChadGamer |
B |
Feb. 9, 2023, 10:21 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
108 |
7884800 |
|
|
192982753 |
SophieHatter |
B |
Feb. 9, 2023, 7:23 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
109 |
9318400 |
|
|
193000546 |
plevande |
B |
Feb. 10, 2023, 12:18 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
124 |
7065600 |
|
|
192968321 |
Ana_naS |
B |
Feb. 9, 2023, 5:30 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
124 |
8294400 |
|
|
192965059 |
SJC_ |
B |
Feb. 9, 2023, 5:17 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
124 |
8294400 |
|
|
192979759 |
gardengnome |
B |
Feb. 9, 2023, 6:55 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
124 |
8806400 |
|
|
192966606 |
poornaTheja |
B |
Feb. 9, 2023, 5:22 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
124 |
9728000 |
|
|
192977684 |
0mancoder0 |
B |
Feb. 9, 2023, 6:36 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
139 |
8806400 |
|
|
193015165 |
welshman_11 |
B |
Feb. 10, 2023, 4:57 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
139 |
9420800 |
|
|
192992072 |
eugalt |
B |
Feb. 9, 2023, 9:16 p.m. |
OK |
Python 3 |
TESTS |
10 |
171 |
307200 |
|
|
192965547 |
eugalt |
B |
Feb. 9, 2023, 5:18 p.m. |
OK |
Python 3 |
TESTS |
10 |
171 |
307200 |
|
|
193012427 |
RayZhang |
B |
Feb. 10, 2023, 4:20 a.m. |
OK |
Python 3 |
TESTS |
11 |
202 |
0 |
|
|
192958614 |
eugalt |
B |
Feb. 9, 2023, 4:28 p.m. |
OK |
Python 3 |
TESTS |
10 |
234 |
307200 |
|
|
192973312 |
sevn |
B |
Feb. 9, 2023, 6:02 p.m. |
OK |
Python 3 |
TESTS |
10 |
248 |
0 |
|
|
192967266 |
sahil45 |
B |
Feb. 9, 2023, 5:25 p.m. |
OK |
Python 3 |
TESTS |
10 |
249 |
0 |
|
|
193012954 |
Srivastava321 |
B |
Feb. 10, 2023, 4:27 a.m. |
OK |
Python 3 |
TESTS |
11 |
264 |
0 |
|
|
193013013 |
phlai326 |
B |
Feb. 10, 2023, 4:28 a.m. |
OK |
Python 3 |
TESTS |
11 |
265 |
0 |
|
|
192959345 |
kovir_aleksey_korroy |
B |
Feb. 9, 2023, 4:30 p.m. |
OK |
Python 3 |
TESTS |
10 |
265 |
0 |
|
|
192959329 |
Nurbibi |
B |
Feb. 9, 2023, 4:30 p.m. |
OK |
Python 3 |
TESTS |
10 |
265 |
0 |
|
|
192998641 |
guillerm0 |
B |
Feb. 9, 2023, 11:25 p.m. |
OK |
Rust 2021 |
TESTS |
10 |
93 |
0 |
|
|
192998500 |
guillerm0 |
B |
Feb. 9, 2023, 11:21 p.m. |
OK |
Rust 2021 |
TESTS |
10 |
109 |
0 |
|
|
remove filters
Back to search problems