Codeforces Round 1048 (Div. 2)

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
2139 Codeforces Round 1048 (Div. 2) FINISHED False 10800 19063523 Sept. 8, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 25720 ) A Maple and Multiplication PROGRAMMING greedy math

Maple has two positive integers (a) and (b). She may perform the following operation any number of times (possibly zero) to make (a) equal to (b): Choose any positive integer (x), and multiply either (a) or (b) by (x). Your task is to determine the minimum number of operations required to make (a) equal to (b). It can be proven that this is always possible. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 100)). The description of the test cases follows. The first and only line of each test case contains two positive integers (a) and (b) ((1 \le a, b \le 1000)) — the numbers Maple currently has. For each test case, output a single integer representing the minimum number of operations Maple needs to make (a) equal to (b). In the first test case, you can multiply (a=1) by (2) to obtain (a=b=2). This requires one operation. In the second test case, you can multiply (a=10) by (300) to get (a = 3000), then multiply (b=3) by (1000) to get (b=3000). This requires two operations. Note that the numbers may exceed (1000) after the operations. In the third test case, (a) and (b) are already equal, so no operations are required.

Tutorials

Codeforces Round 1048 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
337705377 og.kostya A Sept. 9, 2025, 5:59 a.m. OK C# 10 TESTS 5 108 0
337705349 og.kostya A Sept. 9, 2025, 5:59 a.m. OK C# 13 TESTS 5 92 0
337698283 fahimsahriar A Sept. 9, 2025, 4:25 a.m. OK C# 13 TESTS 5 139 0
337698264 zhangbh A Sept. 9, 2025, 4:25 a.m. OK C++17 (GCC 7-32) TESTS 5 30 0
337696400 shahriarrafsun A Sept. 9, 2025, 3:55 a.m. OK C++17 (GCC 7-32) TESTS 5 30 0
337688872 Lakoka A Sept. 9, 2025, 2:01 a.m. OK C++17 (GCC 7-32) TESTS 5 30 0
337666818 SaiSwarupPanda_2005 A Sept. 8, 2025, 7:05 p.m. OK C++17 (GCC 7-32) TESTS 5 30 0
337684494 ebrahim3181 A Sept. 9, 2025, 12:31 a.m. OK C++17 (GCC 7-32) TESTS 5 30 102400
337703574 FMTTM1400 A Sept. 9, 2025, 5:37 a.m. OK C++17 (GCC 7-32) TESTS 5 31 0
337700075 lakshya.sharma A Sept. 9, 2025, 4:52 a.m. OK C++17 (GCC 7-32) TESTS 5 31 0
337699393 rajdeepsingh77 A Sept. 9, 2025, 4:42 a.m. OK C++17 (GCC 7-32) TESTS 5 31 0
337696933 eggtomota A Sept. 9, 2025, 4:03 a.m. OK C++17 (GCC 7-32) TESTS 5 31 0
337696235 hdy A Sept. 9, 2025, 3:52 a.m. OK C++17 (GCC 7-32) TESTS 5 31 0
337699147 ZERO_HIKARI A Sept. 9, 2025, 4:38 a.m. OK C++20 (GCC 13-64) TESTS 5 30 0
337697355 Whitefc A Sept. 9, 2025, 4:10 a.m. OK C++20 (GCC 13-64) TESTS 5 30 0
337683204 mohibulJesan A Sept. 8, 2025, 11:58 p.m. OK C++20 (GCC 13-64) TESTS 5 30 0
337682129 _AhmedTarek_ A Sept. 8, 2025, 11:25 p.m. OK C++20 (GCC 13-64) TESTS 5 30 0
337705306 pro_to_pro A Sept. 9, 2025, 5:58 a.m. OK C++20 (GCC 13-64) TESTS 5 31 0
337701799 Masum__ A Sept. 9, 2025, 5:14 a.m. OK C++20 (GCC 13-64) TESTS 5 31 0
337697789 aneee A Sept. 9, 2025, 4:17 a.m. OK C++20 (GCC 13-64) TESTS 5 31 0
337693950 DGH_Didi A Sept. 9, 2025, 3:20 a.m. OK C++20 (GCC 13-64) TESTS 5 31 0
337693462 BinaryMonk A Sept. 9, 2025, 3:13 a.m. OK C++20 (GCC 13-64) TESTS 5 31 0
337693413 xgyxgy A Sept. 9, 2025, 3:12 a.m. OK C++20 (GCC 13-64) TESTS 5 31 0
337704836 OPmaddy24 A Sept. 9, 2025, 5:52 a.m. OK C++23 (GCC 14-64, msys2) TESTS 5 30 0
337687996 Stonegrip A Sept. 9, 2025, 1:45 a.m. OK C++23 (GCC 14-64, msys2) TESTS 5 30 0
337682525 Nylia03 A Sept. 8, 2025, 11:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 5 30 0
337705078 tupekrishhna A Sept. 9, 2025, 5:55 a.m. OK C++23 (GCC 14-64, msys2) TESTS 5 31 0
337704885 vuivethoima A Sept. 9, 2025, 5:53 a.m. OK C++23 (GCC 14-64, msys2) TESTS 5 31 0
337703661 Selim A Sept. 9, 2025, 5:38 a.m. OK C++23 (GCC 14-64, msys2) TESTS 5 31 0
337703272 k.saif A Sept. 9, 2025, 5:33 a.m. OK C++23 (GCC 14-64, msys2) TESTS 5 31 0
337702806 shreyansh2605a A Sept. 9, 2025, 5:27 a.m. OK C++23 (GCC 14-64, msys2) TESTS 5 31 0
337698947 ayushdubey21jan A Sept. 9, 2025, 4:35 a.m. OK C++23 (GCC 14-64, msys2) TESTS 5 31 0
337697404 T4nishq A Sept. 9, 2025, 4:11 a.m. OK C++23 (GCC 14-64, msys2) TESTS 5 31 0
337656282 Mad_PD A Sept. 8, 2025, 5:21 p.m. OK GNU C11 TESTS 5 15 0
337700587 sakethreddy123 A Sept. 9, 2025, 4:59 a.m. OK GNU C11 TESTS 5 30 102400
337647017 faiyaz_muhtadi A Sept. 8, 2025, 4:53 p.m. OK GNU C11 TESTS 5 30 102400
337670224 venceremos A Sept. 8, 2025, 7:36 p.m. OK GNU C11 TESTS 5 31 0
337658960 Rimon_views A Sept. 8, 2025, 5:29 p.m. OK GNU C11 TESTS 5 31 0
337691607 K_Brishty A Sept. 9, 2025, 2:46 a.m. OK GNU C11 TESTS 5 31 102400
337693495 nullptex A Sept. 9, 2025, 3:13 a.m. OK GNU C11 TESTS 5 46 0
337666574 2405122_Rajdip_Deb A Sept. 8, 2025, 7:03 p.m. OK GNU C11 TESTS 5 46 0
337691023 K_Brishty A Sept. 9, 2025, 2:37 a.m. OK GNU C11 TESTS 5 46 102400
337689041 vaibhav_sonkusare A Sept. 9, 2025, 2:04 a.m. OK GNU C11 TESTS 5 46 102400
337677225 ParthSingla A Sept. 8, 2025, 9:15 p.m. OK Java 21 TESTS 5 187 512000
337687428 nabina1395 A Sept. 9, 2025, 1:34 a.m. OK Java 21 TESTS 5 202 0
337673732 amazion23 A Sept. 8, 2025, 8:18 p.m. OK Java 21 TESTS 5 202 204800
337688373 lupunish A Sept. 9, 2025, 1:52 a.m. OK Java 21 TESTS 5 203 614400
337703259 Spencer1s A Sept. 9, 2025, 5:33 a.m. OK Java 21 TESTS 5 218 614400
337671314 Aaditysa01sehgal A Sept. 8, 2025, 7:48 p.m. OK Java 21 TESTS 5 218 819200
337696473 vin_contra A Sept. 9, 2025, 3:56 a.m. OK Java 21 TESTS 5 218 1228800
337687839 sulabhambule A Sept. 9, 2025, 1:42 a.m. OK Java 21 TESTS 5 233 409600
337677109 WrongAnswerOnTestCase2 A Sept. 8, 2025, 9:13 p.m. OK Java 21 TESTS 5 233 409600
337648571 Lakshitha_R_E A Sept. 8, 2025, 4:58 p.m. OK Java 21 TESTS 5 233 921600
337673864 eayero A Sept. 8, 2025, 8:19 p.m. OK Java 8 TESTS 5 139 0
337673555 eayero A Sept. 8, 2025, 8:15 p.m. OK Java 8 TESTS 5 140 0
337672523 eayero A Sept. 8, 2025, 8:02 p.m. OK Java 8 TESTS 5 140 0
337655636 KrisnhnaSrivastava A Sept. 8, 2025, 5:19 p.m. OK Java 8 TESTS 5 155 0
337671380 kripu-star A Sept. 8, 2025, 7:49 p.m. OK Java 8 TESTS 5 156 0
337705049 jroy.karnati A Sept. 9, 2025, 5:55 a.m. OK Java 8 TESTS 5 171 0
337704497 singha0391 A Sept. 9, 2025, 5:48 a.m. OK Java 8 TESTS 5 171 0
337654434 animesh1226 A Sept. 8, 2025, 5:15 p.m. OK Java 8 TESTS 5 171 0
337651079 JatinBhardwaj4244 A Sept. 8, 2025, 5:05 p.m. OK Java 8 TESTS 5 171 0
337644690 vbpatil2004 A Sept. 8, 2025, 4:47 p.m. OK Java 8 TESTS 5 171 0
337703075 archittect A Sept. 9, 2025, 5:30 a.m. OK PyPy 3 TESTS 5 77 0
337648864 Vss240301578_Hassan. A Sept. 8, 2025, 4:59 p.m. OK PyPy 3 TESTS 5 78 0
337669438 L-S-S A Sept. 8, 2025, 7:28 p.m. OK PyPy 3 TESTS 5 93 0
337659392 Small_update A Sept. 8, 2025, 5:31 p.m. OK PyPy 3 TESTS 5 93 0
337670952 pTaran17 A Sept. 8, 2025, 7:44 p.m. OK PyPy 3 TESTS 5 93 409600
337686861 bpdolson A Sept. 9, 2025, 1:24 a.m. OK PyPy 3 TESTS 5 108 409600
337703085 Gtintin A Sept. 9, 2025, 5:30 a.m. OK PyPy 3-64 TESTS 5 62 0
337704046 pythonalism A Sept. 9, 2025, 5:43 a.m. OK PyPy 3-64 TESTS 5 77 0
337703644 krishna_t A Sept. 9, 2025, 5:38 a.m. OK PyPy 3-64 TESTS 5 77 0
337703242 jvhaooooo A Sept. 9, 2025, 5:33 a.m. OK PyPy 3-64 TESTS 5 77 0
337700831 VSS304063_HooriaB A Sept. 9, 2025, 5:02 a.m. OK PyPy 3-64 TESTS 5 77 0
337699748 fuyo1622 A Sept. 9, 2025, 4:47 a.m. OK PyPy 3-64 TESTS 5 77 0
337698616 Isatay123 A Sept. 9, 2025, 4:30 a.m. OK PyPy 3-64 TESTS 5 77 0
337698251 XVETV8 A Sept. 9, 2025, 4:24 a.m. OK PyPy 3-64 TESTS 5 77 0
337695833 gauravkumar74123 A Sept. 9, 2025, 3:46 a.m. OK PyPy 3-64 TESTS 5 77 0
337694771 24GB A Sept. 9, 2025, 3:30 a.m. OK PyPy 3-64 TESTS 5 77 0
337679235 Skill_Issue A Sept. 8, 2025, 10:01 p.m. OK Python 3 TESTS 5 46 0
337705438 tanvir.exe A Sept. 9, 2025, 6 a.m. OK Python 3 TESTS 5 61 0
337660185 bhumik_y A Sept. 8, 2025, 5:33 p.m. OK Python 3 TESTS 5 61 0
337699896 Bhavish777 A Sept. 9, 2025, 4:49 a.m. OK Python 3 TESTS 5 62 0
337698934 trustNobody A Sept. 9, 2025, 4:35 a.m. OK Python 3 TESTS 5 62 0
337689373 dipayan030 A Sept. 9, 2025, 2:10 a.m. OK Python 3 TESTS 5 62 0
337675588 eugalt A Sept. 8, 2025, 8:46 p.m. OK Python 3 TESTS 5 62 0
337671041 nvggoat A Sept. 8, 2025, 7:45 p.m. OK Python 3 TESTS 5 62 0
337667835 animeshsingh38 A Sept. 8, 2025, 7:14 p.m. OK Python 3 TESTS 5 62 0
337657441 MUDITAGRAWAL A Sept. 8, 2025, 5:25 p.m. OK Python 3 TESTS 5 62 0
337677926 Ckiddo A Sept. 8, 2025, 9:30 p.m. OK Rust 2021 TESTS 5 62 0
337684944 alexis_g_alba A Sept. 9, 2025, 12:40 a.m. OK Rust 2024 TESTS 5 46 0

remove filters

Back to search problems