Codeforces Round 762 (Div. 3)

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.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1619 Codeforces Round 762 (Div. 3) FINISHED False 8100 97255463 Dec. 20, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 21360 ) C Wrong Addition PROGRAMMING implementation

B'Tanya is learning how to add numbers, but so far she is not doing it correctly. She is adding two numbers a and b using the following algorithm: For example, the numbers a = 17236 and b = 3465 Tanya adds up as follows: large{ begin{array}{r} + begin{array}{r} 17236 03465 end{array} hline begin{array}{r} 1106911 end{array} end{array}} As a result, she gets 1106911 . You are given two positive integers a and s . Find the number b such that by adding a and b as described above, Tanya will get s . Or determine that no suitable b exists. The first line of input data contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Each test case consists of a single line containing two positive integers a and s ( 1 <= a lt s <= 10^{18} ) separated by a space. For each test case print the answer on a separate line. If the solution exists, print a single positive integer b . The answer must be written without leading zeros. If multiple answers exist, print any of them. If no suitable number b exists, output -1. The first test case is explained in the main part of the statement. In the third test case, we cannot choose b that satisfies the problem statement. '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
140120135 ssvb C Dec. 21, 2021, 1:42 a.m. OK D TESTS 5 30 0
140124090 klimisnotmilk C Dec. 21, 2021, 3:41 a.m. OK GNU C11 TESTS 5 15 0
140109145 sajjad_ C Dec. 20, 2021, 7:50 p.m. OK GNU C11 TESTS 5 31 0
140109244 sajjad_ C Dec. 20, 2021, 7:52 p.m. OK GNU C11 TESTS 5 46 0
140109430 sajjad_ C Dec. 20, 2021, 7:55 p.m. OK GNU C11 TESTS 5 46 0
140140484 Equinox-Flower C Dec. 21, 2021, 8:06 a.m. OK GNU C11 TESTS 5 46 0
140162769 Sora_2 C Dec. 21, 2021, 12:27 p.m. OK GNU C11 TESTS 5 46 0
140195360 parthu C Dec. 21, 2021, 6:02 p.m. OK GNU C11 TESTS 5 46 0
140108135 sajjad_ C Dec. 20, 2021, 7:34 p.m. OK GNU C11 TESTS 5 46 0
140109051 sajjad_ C Dec. 20, 2021, 7:48 p.m. OK GNU C11 TESTS 5 46 0
140109196 sajjad_ C Dec. 20, 2021, 7:51 p.m. OK GNU C11 TESTS 5 46 0
140127467 W4H1 C Dec. 21, 2021, 4:54 a.m. OK GNU C++14 TESTS 5 0 0
140154564 aryanttripathi C Dec. 21, 2021, 10:47 a.m. OK GNU C++14 TESTS 5 0 0
140133752 d3c3ptr0n C Dec. 21, 2021, 6:46 a.m. OK GNU C++14 TESTS 5 0 0
140217099 1_Hypex_ C Dec. 22, 2021, 3:16 a.m. OK GNU C++14 TESTS 5 0 0
140194414 prakash_26 C Dec. 21, 2021, 5:52 p.m. OK GNU C++14 TESTS 5 0 0
140178687 lit2020008 C Dec. 21, 2021, 3:13 p.m. OK GNU C++14 TESTS 5 0 0
140169507 Its_AJ C Dec. 21, 2021, 1:42 p.m. OK GNU C++14 TESTS 5 0 0
140161266 syf1201 C Dec. 21, 2021, 12:10 p.m. OK GNU C++14 TESTS 5 0 0
140220091 Sawan_pateo C Dec. 22, 2021, 4:29 a.m. OK GNU C++14 TESTS 5 15 0
140220876 singhabhinavv C Dec. 22, 2021, 4:46 a.m. OK GNU C++14 TESTS 5 15 0
140198325 Yash_Bhargava C Dec. 21, 2021, 6:37 p.m. OK GNU C++17 TESTS 5 0 0
140219082 pritishcf307 C Dec. 22, 2021, 4:07 a.m. OK GNU C++17 TESTS 5 0 0
140218263 vioalbert C Dec. 22, 2021, 3:45 a.m. OK GNU C++17 TESTS 5 0 0
140185176 hrishabh_ C Dec. 21, 2021, 4:16 p.m. OK GNU C++17 TESTS 5 0 0
140179916 amritx8 C Dec. 21, 2021, 3:26 p.m. OK GNU C++17 TESTS 5 0 0
140176286 thabumi C Dec. 21, 2021, 2:49 p.m. OK GNU C++17 TESTS 5 0 0
140174925 dhritishman22 C Dec. 21, 2021, 2:35 p.m. OK GNU C++17 TESTS 5 0 0
140172557 _Ritesh C Dec. 21, 2021, 2:13 p.m. OK GNU C++17 TESTS 5 0 0
140171821 strayghost C Dec. 21, 2021, 2:06 p.m. OK GNU C++17 TESTS 5 0 0
140169404 rayhan28 C Dec. 21, 2021, 1:40 p.m. OK GNU C++17 TESTS 5 0 0
140129367 Adi21shyam C Dec. 21, 2021, 5:24 a.m. OK GNU C++17 (64) TESTS 5 0 0
140133600 Mac.Rose C Dec. 21, 2021, 6:45 a.m. OK GNU C++17 (64) TESTS 5 0 0
140139407 alif_cse_ju C Dec. 21, 2021, 7:53 a.m. OK GNU C++17 (64) TESTS 5 0 0
140139627 Bit_Master_2205 C Dec. 21, 2021, 7:55 a.m. OK GNU C++17 (64) TESTS 5 0 0
140142449 Os07 C Dec. 21, 2021, 8:29 a.m. OK GNU C++17 (64) TESTS 5 0 0
140143237 ssAmanSoni1 C Dec. 21, 2021, 8:38 a.m. OK GNU C++17 (64) TESTS 5 0 0
140143353 asawa.harsh C Dec. 21, 2021, 8:40 a.m. OK GNU C++17 (64) TESTS 5 0 0
140152236 prottoyfuad C Dec. 21, 2021, 10:20 a.m. OK GNU C++17 (64) TESTS 5 0 0
140173527 Menna-Allah05 C Dec. 21, 2021, 2:21 p.m. OK GNU C++17 (64) TESTS 5 0 0
140176491 isheoran C Dec. 21, 2021, 2:51 p.m. OK GNU C++17 (64) TESTS 5 0 0
140184934 dewset C Dec. 21, 2021, 4:14 p.m. OK GNU C++20 (64) TESTS 5 0 0
140213937 nathan_luiz C Dec. 22, 2021, 1:38 a.m. OK GNU C++20 (64) TESTS 5 0 0
140206024 Enigma_52 C Dec. 21, 2021, 8:53 p.m. OK GNU C++20 (64) TESTS 5 0 0
140201498 rebel_404 C Dec. 21, 2021, 7:25 p.m. OK GNU C++20 (64) TESTS 5 0 0
140200506 IvanBorquez C Dec. 21, 2021, 7:09 p.m. OK GNU C++20 (64) TESTS 5 0 0
140199164 piyush_pransukhka C Dec. 21, 2021, 6:49 p.m. OK GNU C++20 (64) TESTS 5 0 0
140198776 KazmetreD C Dec. 21, 2021, 6:44 p.m. OK GNU C++20 (64) TESTS 5 0 0
140194371 mdolchic C Dec. 21, 2021, 5:52 p.m. OK GNU C++20 (64) TESTS 5 0 0
140181943 coding_priest7 C Dec. 21, 2021, 3:46 p.m. OK GNU C++20 (64) TESTS 5 0 0
140218441 Amimoy12 C Dec. 22, 2021, 3:50 a.m. OK GNU C++20 (64) TESTS 5 0 0
140152495 graceoflives C Dec. 21, 2021, 10:23 a.m. OK Go TESTS 5 61 716800
140150318 Satyaa C Dec. 21, 2021, 9:57 a.m. OK Java 11 TESTS 5 171 0
140171154 kamal_20 C Dec. 21, 2021, 1:59 p.m. OK Java 11 TESTS 5 186 0
140171487 kamal_20 C Dec. 21, 2021, 2:02 p.m. OK Java 11 TESTS 5 187 0
140140101 YaduAhuja C Dec. 21, 2021, 8:02 a.m. OK Java 11 TESTS 5 187 0
140149523 arpit_c10992 C Dec. 21, 2021, 9:48 a.m. OK Java 11 TESTS 5 187 0
140119265 long2142453426 C Dec. 21, 2021, 1:07 a.m. OK Java 11 TESTS 5 187 0
140171908 Abhinavrajhans C Dec. 21, 2021, 2:06 p.m. OK Java 11 TESTS 5 187 0
140110930 vijender_8601 C Dec. 20, 2021, 8:26 p.m. OK Java 11 TESTS 5 202 0
140217880 peterwayne C Dec. 22, 2021, 3:35 a.m. OK Java 11 TESTS 5 202 0
140193042 Halix C Dec. 21, 2021, 5:37 p.m. OK Java 11 TESTS 5 202 0
140140279 solo07 C Dec. 21, 2021, 8:04 a.m. OK Java 8 TESTS 5 93 0
140203071 Yuxiang C Dec. 21, 2021, 7:53 p.m. OK Java 8 TESTS 5 108 0
140133398 tushar24 C Dec. 21, 2021, 6:42 a.m. OK Java 8 TESTS 5 109 0
140121690 201502010200 C Dec. 21, 2021, 2:36 a.m. OK Java 8 TESTS 5 109 0
140151334 K0ka C Dec. 21, 2021, 10:10 a.m. OK Java 8 TESTS 5 124 0
140180214 aspect_129 C Dec. 21, 2021, 3:29 p.m. OK Java 8 TESTS 5 124 0
140115895 Shobhit_Behl C Dec. 20, 2021, 10:38 p.m. OK Java 8 TESTS 5 124 0
140138509 lcheeme1 C Dec. 21, 2021, 7:43 a.m. OK Java 8 TESTS 5 139 0
140153229 leader_coc C Dec. 21, 2021, 10:31 a.m. OK Java 8 TESTS 5 139 0
140161717 tanishq044 C Dec. 21, 2021, 12:15 p.m. OK Java 8 TESTS 5 171 0
140108033 PavelChadnov C Dec. 20, 2021, 7:32 p.m. OK Kotlin 1.5 TESTS 5 311 0
140182949 Killer_No.47 C Dec. 21, 2021, 3:56 p.m. OK MS C++ 2017 TESTS 5 30 102400
140153681 Shuai. C Dec. 21, 2021, 10:36 a.m. OK MS C++ 2017 TESTS 5 46 0
140165289 A_Pier C Dec. 21, 2021, 12:57 p.m. OK MS C++ 2017 TESTS 5 46 0
140133633 zcyfish C Dec. 21, 2021, 6:45 a.m. OK MS C++ 2017 TESTS 5 46 0
140133975 mishra-aayush C Dec. 21, 2021, 6:49 a.m. OK MS C++ 2017 TESTS 5 46 819200
140125445 L1z C Dec. 21, 2021, 4:13 a.m. OK MS C++ 2017 TESTS 5 61 0
140126155 Torehalt C Dec. 21, 2021, 4:29 a.m. OK MS C++ 2017 TESTS 5 62 0
140201008 mode30122002 C Dec. 21, 2021, 7:17 p.m. OK MS C++ 2017 TESTS 5 62 0
140165210 A_Pier C Dec. 21, 2021, 12:56 p.m. OK MS C++ 2017 TESTS 5 62 0
140126980 no2newbie C Dec. 21, 2021, 4:45 a.m. OK MS C++ 2017 TESTS 5 77 0
140200320 suraj__ C Dec. 21, 2021, 7:06 p.m. OK .NET Core C# TESTS 5 124 4300800
140144491 chinesedfan C Dec. 21, 2021, 8:53 a.m. OK Node.js TESTS 5 93 5324800
140178062 osato C Dec. 21, 2021, 3:07 p.m. OK Node.js TESTS 5 171 5939200
140224066 genius_a C Dec. 22, 2021, 5:43 a.m. OK Node.js TESTS 5 186 5836800
140133135 Khanhzuu C Dec. 21, 2021, 6:40 a.m. OK Node.js TESTS 5 234 5836800
140124149 Khanhzuu C Dec. 21, 2021, 3:42 a.m. OK Node.js TESTS 5 249 6451200
140171137 1_2_3_4_5_9 C Dec. 21, 2021, 1:59 p.m. OK PyPy 2 TESTS 5 155 4403200
140169532 14_15_16 C Dec. 21, 2021, 1:42 p.m. OK PyPy 2 TESTS 5 155 4403200
140118649 OlavBakken C Dec. 21, 2021, 12:37 a.m. OK PyPy 2 TESTS 5 358 5017600
140110500 unknownSolver C Dec. 20, 2021, 8:17 p.m. OK PyPy 3 TESTS 5 202 7884800
140217923 Liberator187 C Dec. 22, 2021, 3:36 a.m. OK PyPy 3 TESTS 5 202 8396800
140223988 brosucks C Dec. 22, 2021, 5:42 a.m. OK PyPy 3 TESTS 5 202 10035200
140152319 piSquared C Dec. 21, 2021, 10:21 a.m. OK PyPy 3 TESTS 5 249 10035200
140175137 Amiy_Tiwari C Dec. 21, 2021, 2:38 p.m. OK PyPy 3 TESTS 5 249 10137600
140204369 hxu10 C Dec. 21, 2021, 8:18 p.m. OK PyPy 3 TESTS 5 311 10649600
140137060 conqueror_of_titia C Dec. 21, 2021, 7:25 a.m. OK PyPy 3 TESTS 5 326 9932800
140122535 pirate0 C Dec. 21, 2021, 3 a.m. OK PyPy 3 TESTS 5 358 9113600
140217003 Youarenotgood C Dec. 22, 2021, 3:14 a.m. OK PyPy 3 TESTS 5 373 9318400
140152741 Hepheastus C Dec. 21, 2021, 10:25 a.m. OK PyPy 3 TESTS 5 373 10240000
140207674 bjy C Dec. 21, 2021, 9:32 p.m. OK PyPy 3-64 TESTS 5 217 5324800
140122032 epoweripi C Dec. 21, 2021, 2:46 a.m. OK PyPy 3-64 TESTS 5 217 8601600
140215260 _Shubham C Dec. 22, 2021, 2:24 a.m. OK PyPy 3-64 TESTS 5 234 5836800
140143055 FrozenKandy C Dec. 21, 2021, 8:36 a.m. OK PyPy 3-64 TESTS 5 234 9318400
140168838 seraph14 C Dec. 21, 2021, 1:34 p.m. OK PyPy 3-64 TESTS 5 265 5529600
140173149 mrobiul C Dec. 21, 2021, 2:18 p.m. OK PyPy 3-64 TESTS 5 265 8806400
140172810 Bit_8 C Dec. 21, 2021, 2:15 p.m. OK PyPy 3-64 TESTS 5 265 8806400
140125228 jainil4801 C Dec. 21, 2021, 4:08 a.m. OK PyPy 3-64 TESTS 5 265 11468800
140169161 seraph14 C Dec. 21, 2021, 1:38 p.m. OK PyPy 3-64 TESTS 5 280 5529600
140181543 moitimemasters C Dec. 21, 2021, 3:42 p.m. OK PyPy 3-64 TESTS 5 280 9216000
140175215 imli_ka_boota C Dec. 21, 2021, 2:39 p.m. OK Python 2 TESTS 5 108 204800
140161866 damjanovicvl C Dec. 21, 2021, 12:17 p.m. OK Python 3 TESTS 5 77 0
140148423 Ipakeev C Dec. 21, 2021, 9:35 a.m. OK Python 3 TESTS 5 77 1024000
140193455 raggzy C Dec. 21, 2021, 5:42 p.m. OK Python 3 TESTS 5 78 0
140150957 2019287 C Dec. 21, 2021, 10:05 a.m. OK Python 3 TESTS 5 93 0
140157213 rango_2405 C Dec. 21, 2021, 11:19 a.m. OK Python 3 TESTS 5 93 102400
140152299 piSquared C Dec. 21, 2021, 10:20 a.m. OK Python 3 TESTS 5 93 102400
140217303 eugalt C Dec. 22, 2021, 3:22 a.m. OK Python 3 TESTS 5 93 512000
140216368 eugalt C Dec. 22, 2021, 2:56 a.m. OK Python 3 TESTS 5 93 512000
140122401 daramzy C Dec. 21, 2021, 2:57 a.m. OK Python 3 TESTS 5 108 0
140216476 eugalt C Dec. 22, 2021, 2:59 a.m. OK Python 3 TESTS 5 108 512000
140186179 mx_maan C Dec. 21, 2021, 4:26 p.m. OK Rust 2021 TESTS 5 15 0
140113959 IvanDyachenko C Dec. 20, 2021, 9:33 p.m. OK Scala TESTS 5 654 102400

remove filters

Back to search problems