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'Ivan decided to prepare for the test on solving integer equations. He noticed that all tasks in the test have the following form: Please help Ivan to solve some equations of this form. The first line contains a single integer t ( 1 <= q t <= q 10^3 ) -- the number of test cases. The next lines contain descriptions of test cases. The only line of each test case contains two integers u and v ( 1 <= q u, v <= q 10^9 ) -- the parameters of the equation. For each test case print two integers x , y -- a possible solution to the equation. It should be satisfied that -10^{18} <= q x, y <= q 10^{18} and (x, y) neq (0, 0) . We can show that an answer always exists. If there are multiple possible solutions you can print any. In the first test case: frac{-1}{1} + frac{1}{1} = 0 = frac{-1 + 1}{1 + 1} . In the second test case: frac{-4}{2} + frac{9}{3} = 1 = frac{-4 + 9}{2 + 3} . In the third test case: frac{-18}{3} + frac{50}{5} = 4 = frac{-18 + 50}{3 + 5} . In the fourth test case: frac{-4}{6} + frac{9}{9} = frac{1}{3} = frac{-4 + 9}{6 + 9} . '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
135556492 |
astaCMR |
A |
Nov. 15, 2021, 4:06 a.m. |
OK |
GNU C11 |
TESTS |
11 |
15 |
0 |
|
800 |
135425124 |
Adnan1729 |
A |
Nov. 14, 2021, 1:18 p.m. |
OK |
GNU C11 |
TESTS |
11 |
15 |
0 |
|
800 |
135504452 |
Ogneopasno |
A |
Nov. 14, 2021, 5:45 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
0 |
0 |
|
800 |
135395736 |
2778256413 |
A |
Nov. 14, 2021, 8:58 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
0 |
1024000 |
|
800 |
135350844 |
NursultanAbd |
A |
Nov. 14, 2021, 6:22 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
0 |
1024000 |
|
800 |
135532618 |
anmit007 |
A |
Nov. 15, 2021, 1:54 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
800 |
135522300 |
Raahaat |
A |
Nov. 15, 2021, 12:52 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
800 |
135521276 |
ZolaWatle |
A |
Nov. 15, 2021, 12:43 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
800 |
135561608 |
jack234232 |
A |
Nov. 15, 2021, 5:56 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
800 |
135555766 |
notjustdude |
A |
Nov. 15, 2021, 3:47 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
800 |
135553963 |
090 |
A |
Nov. 15, 2021, 2:56 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
800 |
135553729 |
liamaking |
A |
Nov. 15, 2021, 2:49 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
0 |
|
800 |
135559145 |
jasonpogi |
A |
Nov. 15, 2021, 5:08 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
0 |
0 |
|
800 |
135503566 |
ace5 |
A |
Nov. 14, 2021, 5:33 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
0 |
0 |
|
800 |
135404765 |
mohamedaymen |
A |
Nov. 14, 2021, 10:12 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
0 |
1024000 |
|
800 |
135359135 |
scanfex |
A |
Nov. 14, 2021, 6:38 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
0 |
1024000 |
|
800 |
135358363 |
Flickyyy |
A |
Nov. 14, 2021, 6:36 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
0 |
1024000 |
|
800 |
135345939 |
Gornak40 |
A |
Nov. 14, 2021, 6:13 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
0 |
1024000 |
|
800 |
135345828 |
Alinka-Kalinka |
A |
Nov. 14, 2021, 6:13 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
0 |
1024000 |
|
800 |
135345053 |
Buffy |
A |
Nov. 14, 2021, 6:11 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
0 |
1024000 |
|
800 |
135561617 |
coder_1128 |
A |
Nov. 15, 2021, 5:56 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
800 |
135561488 |
Yulia_04 |
A |
Nov. 15, 2021, 5:53 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
0 |
|
800 |
135360142 |
MatveyR |
A |
Nov. 14, 2021, 6:40 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
0 |
1126400 |
|
800 |
135344273 |
Ripiaun |
A |
Nov. 14, 2021, 6:10 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135378002 |
rubbertrestle23 |
A |
Nov. 14, 2021, 7:27 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135361108 |
aartdem |
A |
Nov. 14, 2021, 6:42 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135347992 |
vlad_1028 |
A |
Nov. 14, 2021, 6:17 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135347798 |
arkarus |
A |
Nov. 14, 2021, 6:17 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135345284 |
sssi111 |
A |
Nov. 14, 2021, 6:12 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135344733 |
aalakhtin |
A |
Nov. 14, 2021, 6:11 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135344381 |
grdkrll |
A |
Nov. 14, 2021, 6:10 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135555914 |
vanpham |
A |
Nov. 15, 2021, 3:51 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
15 |
0 |
|
800 |
135506977 |
ispritchin |
A |
Nov. 14, 2021, 6:19 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
0 |
|
800 |
135512918 |
program141592 |
A |
Nov. 14, 2021, 8 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
0 |
|
800 |
135358657 |
EscKaram |
A |
Nov. 14, 2021, 6:37 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135353695 |
vollery |
A |
Nov. 14, 2021, 6:28 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135349724 |
EnDeRBeaT |
A |
Nov. 14, 2021, 6:20 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135348007 |
igorfardoc |
A |
Nov. 14, 2021, 6:17 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135347977 |
almost_nutella |
A |
Nov. 14, 2021, 6:17 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135348946 |
Yan-Drozh |
A |
Nov. 14, 2021, 6:19 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135422297 |
funchoza |
A |
Nov. 14, 2021, 12:54 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135363111 |
arseny2606 |
A |
Nov. 14, 2021, 6:46 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
0 |
1228800 |
|
800 |
135509720 |
singhshivsm20001 |
A |
Nov. 14, 2021, 7:02 p.m. |
OK |
Java 11 |
TESTS |
11 |
187 |
0 |
|
800 |
135397975 |
herozyy |
A |
Nov. 14, 2021, 9:12 a.m. |
OK |
Java 11 |
TESTS |
11 |
233 |
24985600 |
|
800 |
135482618 |
ujjwalavishek |
A |
Nov. 14, 2021, 2:45 p.m. |
OK |
Java 11 |
TESTS |
11 |
264 |
0 |
|
800 |
135359194 |
t0nso1eil |
A |
Nov. 14, 2021, 6:38 a.m. |
OK |
Java 11 |
TESTS |
11 |
265 |
24883200 |
|
800 |
135349676 |
Denis_koch |
A |
Nov. 14, 2021, 6:20 a.m. |
OK |
Java 11 |
TESTS |
11 |
265 |
25497600 |
|
800 |
135353225 |
RedDime |
A |
Nov. 14, 2021, 6:27 a.m. |
OK |
Java 11 |
TESTS |
11 |
280 |
25497600 |
|
800 |
135370335 |
0x2ee0 |
A |
Nov. 14, 2021, 7:04 a.m. |
OK |
Java 11 |
TESTS |
11 |
280 |
25600000 |
|
800 |
135362701 |
v0s7er |
A |
Nov. 14, 2021, 6:45 a.m. |
OK |
Java 11 |
TESTS |
11 |
920 |
24883200 |
|
800 |
135533300 |
amit_roy |
A |
Nov. 15, 2021, 2:15 a.m. |
OK |
Java 8 |
TESTS |
11 |
155 |
0 |
|
800 |
135418147 |
toufique_husein |
A |
Nov. 14, 2021, 12:15 p.m. |
OK |
Java 8 |
TESTS |
11 |
156 |
19558400 |
|
800 |
135345768 |
grand0 |
A |
Nov. 14, 2021, 6:13 a.m. |
OK |
Java 8 |
TESTS |
11 |
170 |
19660800 |
|
800 |
135349928 |
g0dzilla |
A |
Nov. 14, 2021, 6:20 a.m. |
OK |
Java 8 |
TESTS |
11 |
171 |
19763200 |
|
800 |
135367702 |
_Astron |
A |
Nov. 14, 2021, 6:57 a.m. |
OK |
Kotlin 1.4 |
TESTS |
11 |
140 |
19660800 |
|
800 |
135349424 |
Dimitrys |
A |
Nov. 14, 2021, 6:20 a.m. |
OK |
Kotlin 1.4 |
TESTS |
11 |
155 |
19558400 |
|
800 |
135349833 |
AndrOgurc |
A |
Nov. 14, 2021, 6:20 a.m. |
OK |
Kotlin 1.5 |
TESTS |
11 |
265 |
25497600 |
|
800 |
135349534 |
Koo_Pung-Kei |
A |
Nov. 14, 2021, 6:20 a.m. |
OK |
Kotlin 1.5 |
TESTS |
11 |
265 |
26112000 |
|
800 |
135481676 |
bkifhr7 |
A |
Nov. 14, 2021, 2:36 p.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
15 |
0 |
|
800 |
135425067 |
vjudge2 |
A |
Nov. 14, 2021, 1:18 p.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
15 |
819200 |
|
800 |
135365236 |
danil1234 |
A |
Nov. 14, 2021, 6:51 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
15 |
1126400 |
|
800 |
135361773 |
setday |
A |
Nov. 14, 2021, 6:43 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
15 |
1126400 |
|
800 |
135384998 |
Moxnatish |
A |
Nov. 14, 2021, 7:52 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
15 |
1126400 |
|
800 |
135381455 |
petrushka29435 |
A |
Nov. 14, 2021, 7:39 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
15 |
1126400 |
|
800 |
135380387 |
Slivanovich |
A |
Nov. 14, 2021, 7:35 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
15 |
1126400 |
|
800 |
135373705 |
michael15346 |
A |
Nov. 14, 2021, 7:13 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
15 |
1126400 |
|
800 |
135373246 |
Clown-9 |
A |
Nov. 14, 2021, 7:12 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
15 |
1126400 |
|
800 |
135369726 |
SandreY |
A |
Nov. 14, 2021, 7:02 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
15 |
1126400 |
|
800 |
135350071 |
maxusD |
A |
Nov. 14, 2021, 6:21 a.m. |
OK |
.NET Core C# |
TESTS |
11 |
62 |
8908800 |
|
800 |
135354160 |
reosfire |
A |
Nov. 14, 2021, 6:28 a.m. |
OK |
.NET Core C# |
TESTS |
11 |
93 |
9113600 |
|
800 |
135353281 |
anontot |
A |
Nov. 14, 2021, 6:27 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
124 |
20480000 |
|
800 |
135381979 |
zirtoshka |
A |
Nov. 14, 2021, 7:41 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
139 |
21196800 |
|
800 |
135479007 |
pskobx |
A |
Nov. 14, 2021, 2:12 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
140 |
3584000 |
|
800 |
135481905 |
Vanturoz |
A |
Nov. 14, 2021, 2:38 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
140 |
3891200 |
|
800 |
135370235 |
Rainbowkittensss |
A |
Nov. 14, 2021, 7:03 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
140 |
20582400 |
|
800 |
135361207 |
NokSyte |
A |
Nov. 14, 2021, 6:42 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
140 |
21196800 |
|
800 |
135348043 |
LeBMykoceeB |
A |
Nov. 14, 2021, 6:17 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
140 |
21196800 |
|
800 |
135346483 |
SoSya |
A |
Nov. 14, 2021, 6:14 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
140 |
21196800 |
|
800 |
135349007 |
Darksy125 |
A |
Nov. 14, 2021, 6:19 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
140 |
21299200 |
|
800 |
135348130 |
semen_eremeev |
A |
Nov. 14, 2021, 6:17 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
140 |
21299200 |
|
800 |
135344408 |
_heqzagone_ |
A |
Nov. 14, 2021, 6:10 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
93 |
30617600 |
|
800 |
135513817 |
jwill19 |
A |
Nov. 14, 2021, 8:18 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
124 |
5529600 |
|
800 |
135347360 |
konductor11 |
A |
Nov. 14, 2021, 6:16 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
124 |
32665600 |
|
800 |
135369212 |
v.iurii |
A |
Nov. 14, 2021, 7:01 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
124 |
32768000 |
|
800 |
135354485 |
vinexe9089 |
A |
Nov. 14, 2021, 6:29 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
124 |
32972800 |
|
800 |
135402269 |
Vaneshik |
A |
Nov. 14, 2021, 9:48 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
124 |
33689600 |
|
800 |
135347284 |
Kalachin_Alexey |
A |
Nov. 14, 2021, 6:16 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
124 |
33894400 |
|
800 |
135356828 |
volkivpered |
A |
Nov. 14, 2021, 6:33 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
124 |
33996800 |
|
800 |
135384614 |
ITManiac |
A |
Nov. 14, 2021, 7:51 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
124 |
34099200 |
|
800 |
135351369 |
KateNS |
A |
Nov. 14, 2021, 6:23 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
124 |
34099200 |
|
800 |
135367612 |
Leon_Krasnov |
A |
Nov. 14, 2021, 6:56 a.m. |
OK |
Python 3 |
TESTS |
11 |
31 |
4505600 |
|
800 |
135357871 |
IOMOIO |
A |
Nov. 14, 2021, 6:35 a.m. |
OK |
Python 3 |
TESTS |
11 |
31 |
4505600 |
|
800 |
135561607 |
Hasanat_Farooq |
A |
Nov. 15, 2021, 5:56 a.m. |
OK |
Python 3 |
TESTS |
11 |
46 |
0 |
|
800 |
135555851 |
Dhruv_Viradiya |
A |
Nov. 15, 2021, 3:49 a.m. |
OK |
Python 3 |
TESTS |
11 |
46 |
0 |
|
800 |
135506698 |
kerzhy |
A |
Nov. 14, 2021, 6:15 p.m. |
OK |
Python 3 |
TESTS |
11 |
46 |
0 |
|
800 |
135500045 |
arghajitbhowmik08 |
A |
Nov. 14, 2021, 4:49 p.m. |
OK |
Python 3 |
TESTS |
11 |
46 |
0 |
|
800 |
135499342 |
odmitryy |
A |
Nov. 14, 2021, 4:41 p.m. |
OK |
Python 3 |
TESTS |
11 |
46 |
0 |
|
800 |
135495142 |
osm05 |
A |
Nov. 14, 2021, 3:53 p.m. |
OK |
Python 3 |
TESTS |
11 |
46 |
0 |
|
800 |
135369419 |
ilyarybin |
A |
Nov. 14, 2021, 7:01 a.m. |
OK |
Python 3 |
TESTS |
11 |
46 |
4198400 |
|
800 |
135366371 |
gilkr1580 |
A |
Nov. 14, 2021, 6:53 a.m. |
OK |
Python 3 |
TESTS |
11 |
46 |
4198400 |
|
800 |
135532282 |
program141592 |
A |
Nov. 15, 2021, 1:43 a.m. |
OK |
Rust |
TESTS |
11 |
15 |
0 |
|
800 |
remove filters
Back to search problems