Codeforces Round 834 (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
1759 Codeforces Round 834 (Div. 3) FINISHED False 8100 68397863 Nov. 18, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14395 ) D Make It Round PROGRAMMING brute force number theory

B'Inflation has occurred in Berlandia, so the store needs to change the price of goods. The current price of good n is given. It is allowed to increase the price of the good by k times, with 1 <= k <= m , k is an integer. Output the roundest possible new price of the good. That is, the one that has the maximum number of zeros at the end. For example, the number 481000 is more round than the number 1000010 (three zeros at the end of 481000 and only one at the end of 1000010). If there are several possible variants, output the one in which the new price is maximal. If it is impossible to get a rounder price, output n cdot m (that is, the maximum possible price). The first line contains a single integer t ( 1 <= t <= 10^4 ) --the number of test cases in the test. Each test case consists of one line. This line contains two integers: n and m ( 1 <= n, m <= 10^9 ). Where n is the old price of the good, and the number m means that you can increase the price n no more than m times. For each test case, output on a separate line the roundest integer of the form n cdot k ( 1 <= k <= m , k -- an integer). If there are several possible variants, output the one in which the new price (value n cdot k ) is maximal. If it is impossible to get a more rounded price, output n cdot m (that is, the maximum possible price). In the first case n = 6 , m = 11 . We cannot get a number with two zeros or more at the end, because we need to increase the price 50 times, but 50 > m = 11 . The maximum price multiple of 10 would be 6 cdot 10 = 60 . In the second case n = 5 , m = 43 . The maximum price multiple of 100 would be 5 cdot 40 = 200 . In the third case, n = 13 , m = 5 . All possible new prices will not end in 0 , then you should output n cdot m = 65 . In the fourth case, you should increase the'...

Tutorials

109254

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
181556365 chrisfcoder D Nov. 19, 2022, 3:51 a.m. OK C# 10 TESTS 13 124 3072000
181516710 FatalityNT D Nov. 18, 2022, 5 p.m. OK C# 8 TESTS 6 140 3072000
181524836 tahtarovserver D Nov. 18, 2022, 5:54 p.m. OK C# 8 TESTS 7 155 3072000
181559192 ge_zhan D Nov. 19, 2022, 4:39 a.m. OK Clang++17 Diagnostics TESTS 13 46 0
181564673 ge_zhan D Nov. 19, 2022, 5:52 a.m. OK Clang++17 Diagnostics TESTS 13 46 0
181564717 ge_zhan D Nov. 19, 2022, 5:53 a.m. OK Clang++20 Diagnostics TESTS 13 46 0
181550007 scutsky D Nov. 19, 2022, 1:44 a.m. OK Clang++20 Diagnostics TESTS 13 218 0
181513569 ruban D Nov. 18, 2022, 4:48 p.m. OK FPC TESTS 6 467 31539200
181519897 Moka50 D Nov. 18, 2022, 5:17 p.m. OK GNU C11 TESTS 6 62 0
181555588 Interested D Nov. 19, 2022, 3:38 a.m. OK GNU C11 TESTS 13 62 0
181547952 1435730 D Nov. 19, 2022, 12:44 a.m. OK GNU C11 TESTS 13 78 0
181521466 nchu_acmer D Nov. 18, 2022, 5:26 p.m. OK GNU C++14 TESTS 6 15 0
181519689 keatszhu D Nov. 18, 2022, 5:16 p.m. OK GNU C++14 TESTS 6 15 0
181541899 SergK D Nov. 18, 2022, 9:31 p.m. OK GNU C++14 TESTS 13 15 0
181536372 miglaniharshrishi D Nov. 18, 2022, 7:58 p.m. OK GNU C++14 TESTS 7 15 0
181523119 sliver_muse D Nov. 18, 2022, 5:39 p.m. OK GNU C++14 TESTS 6 15 0
181539507 ALSHLKANY D Nov. 18, 2022, 8:45 p.m. OK GNU C++14 TESTS 13 15 0
181513600 bool_sheet D Nov. 18, 2022, 4:48 p.m. OK GNU C++14 TESTS 6 15 102400
181518272 ce1190222 D Nov. 18, 2022, 5:08 p.m. OK GNU C++14 TESTS 6 15 819200
181534453 Anumoy_nandy D Nov. 18, 2022, 7:35 p.m. OK GNU C++14 TESTS 7 15 1843200
181529356 Dynamoking D Nov. 18, 2022, 6:39 p.m. OK GNU C++14 TESTS 7 15 7270400
181526796 ChenYanyv D Nov. 18, 2022, 6:12 p.m. OK GNU C++17 TESTS 7 15 0
181565348 manojkumarchatti765 D Nov. 19, 2022, 6 a.m. OK GNU C++17 TESTS 13 15 0
181561979 yash_karakoti D Nov. 19, 2022, 5:19 a.m. OK GNU C++17 TESTS 13 15 0
181560007 genemator D Nov. 19, 2022, 4:52 a.m. OK GNU C++17 TESTS 13 15 0
181554515 lqrs D Nov. 19, 2022, 3:19 a.m. OK GNU C++17 TESTS 13 15 0
181551272 wanwan. D Nov. 19, 2022, 2:12 a.m. OK GNU C++17 TESTS 13 15 0
181534674 medeshi.kristian D Nov. 18, 2022, 7:37 p.m. OK GNU C++17 TESTS 7 15 0
181527818 NOT_NEWBIE D Nov. 18, 2022, 6:22 p.m. OK GNU C++17 TESTS 7 15 0
181524798 razoncdr D Nov. 18, 2022, 5:53 p.m. OK GNU C++17 TESTS 7 15 0
181524696 onfire_02 D Nov. 18, 2022, 5:52 p.m. OK GNU C++17 TESTS 7 15 0
181542384 MananDahiya D Nov. 18, 2022, 9:42 p.m. OK GNU C++17 (64) TESTS 13 15 0
181533836 arnav2004 D Nov. 18, 2022, 7:28 p.m. OK GNU C++17 (64) TESTS 7 15 0
181531924 BetoSCL D Nov. 18, 2022, 7:08 p.m. OK GNU C++17 (64) TESTS 7 15 0
181528759 XBuriza D Nov. 18, 2022, 6:32 p.m. OK GNU C++17 (64) TESTS 7 15 0
181521452 freehandle D Nov. 18, 2022, 5:26 p.m. OK GNU C++17 (64) TESTS 6 15 0
181521353 DBDFT D Nov. 18, 2022, 5:26 p.m. OK GNU C++17 (64) TESTS 6 15 0
181521199 atulkumarmaurya201 D Nov. 18, 2022, 5:25 p.m. OK GNU C++17 (64) TESTS 6 15 0
181554004 FangYifan D Nov. 19, 2022, 3:07 a.m. OK GNU C++17 (64) TESTS 13 15 0
181559154 2-qiym D Nov. 19, 2022, 4:39 a.m. OK GNU C++17 (64) TESTS 13 15 0
181560032 shuaideyipi D Nov. 19, 2022, 4:52 a.m. OK GNU C++17 (64) TESTS 13 15 0
181565448 AlMuhitMuhtadi D Nov. 19, 2022, 6:01 a.m. OK GNU C++20 (64) TESTS 13 15 0
181564845 Sabbir1807070 D Nov. 19, 2022, 5:54 a.m. OK GNU C++20 (64) TESTS 13 15 0
181564263 neerajp7 D Nov. 19, 2022, 5:47 a.m. OK GNU C++20 (64) TESTS 13 15 0
181563876 Tszicu D Nov. 19, 2022, 5:43 a.m. OK GNU C++20 (64) TESTS 13 15 0
181563053 hrai_20 D Nov. 19, 2022, 5:33 a.m. OK GNU C++20 (64) TESTS 13 15 0
181562905 blockche D Nov. 19, 2022, 5:31 a.m. OK GNU C++20 (64) TESTS 13 15 0
181561625 jtrh D Nov. 19, 2022, 5:15 a.m. OK GNU C++20 (64) TESTS 13 15 0
181561392 tuanpham1032003 D Nov. 19, 2022, 5:11 a.m. OK GNU C++20 (64) TESTS 13 15 0
181561292 kalavalarevanth D Nov. 19, 2022, 5:10 a.m. OK GNU C++20 (64) TESTS 13 15 0
181560206 rxhxn_30 D Nov. 19, 2022, 4:54 a.m. OK GNU C++20 (64) TESTS 13 15 0
181551790 enviornment D Nov. 19, 2022, 2:24 a.m. OK Java 11 TESTS 13 171 0
181557312 dhruv_07 D Nov. 19, 2022, 4:08 a.m. OK Java 11 TESTS 13 186 0
181518309 AyushS_cg170 D Nov. 18, 2022, 5:08 p.m. OK Java 11 TESTS 6 186 0
181514528 _sumitchavanM D Nov. 18, 2022, 4:49 p.m. OK Java 11 TESTS 6 186 0
181535764 HeXecutor D Nov. 18, 2022, 7:50 p.m. OK Java 11 TESTS 7 233 0
181529052 singhharman D Nov. 18, 2022, 6:35 p.m. OK Java 11 TESTS 7 249 0
181528455 singhharman D Nov. 18, 2022, 6:29 p.m. OK Java 11 TESTS 7 265 0
181528389 Harman_Singh D Nov. 18, 2022, 6:28 p.m. OK Java 11 TESTS 7 265 0
181548146 Eya_Mattoussi D Nov. 19, 2022, 12:50 a.m. OK Java 11 TESTS 13 312 0
181535783 MThiaweng D Nov. 18, 2022, 7:51 p.m. OK Java 17 TESTS 7 265 0
181522453 Kaju_ D Nov. 18, 2022, 5:33 p.m. OK Java 17 TESTS 6 296 1331200
181546140 _arcade D Nov. 18, 2022, 11:33 p.m. OK Java 17 TESTS 13 358 307200
181535038 xplorer D Nov. 18, 2022, 7:42 p.m. OK Java 17 TESTS 7 389 307200
181535054 Mohamed308 D Nov. 18, 2022, 7:42 p.m. OK Java 8 TESTS 7 93 0
181562286 Koka D Nov. 19, 2022, 5:23 a.m. OK Java 8 TESTS 13 108 0
181513701 nithin_bharathi D Nov. 18, 2022, 4:48 p.m. OK Java 8 TESTS 6 109 0
181513741 rish1896 D Nov. 18, 2022, 4:49 p.m. OK Java 8 TESTS 6 124 0
181517856 tbs-jyy D Nov. 18, 2022, 5:05 p.m. OK Java 8 TESTS 6 140 0
181549799 duyipeng D Nov. 19, 2022, 1:39 a.m. OK Java 8 TESTS 13 156 0
181511046 ganesh_6 D Nov. 18, 2022, 4:44 p.m. OK Java 8 TESTS 6 171 0
181529887 _NursultaN_ D Nov. 18, 2022, 6:45 p.m. OK Java 8 TESTS 7 187 0
181541004 shuishui0021 D Nov. 18, 2022, 9:11 p.m. OK Java 8 TESTS 13 373 0
181559765 hua_yi_jiu D Nov. 19, 2022, 4:48 a.m. OK MS C++ 2017 TESTS 13 62 0
181518294 abhishek_pri D Nov. 18, 2022, 5:08 p.m. OK MS C++ 2017 TESTS 6 62 0
181528903 sw_enthusiast D Nov. 18, 2022, 6:34 p.m. OK PyPy 3 TESTS 7 248 74956800
181543345 Lammert0907 D Nov. 18, 2022, 10:04 p.m. OK PyPy 3 TESTS 13 390 9728000
181519853 Chanzan D Nov. 18, 2022, 5:16 p.m. OK PyPy 3 TESTS 6 545 10240000
181516056 NarzullayevSaidmurod D Nov. 18, 2022, 4:56 p.m. OK PyPy 3 TESTS 6 561 9625600
181534243 hkwu6013 D Nov. 18, 2022, 7:32 p.m. OK PyPy 3-64 TESTS 7 124 8908800
181515832 SoleProprietor D Nov. 18, 2022, 4:55 p.m. OK PyPy 3-64 TESTS 6 124 9420800
181539546 generalPurpose D Nov. 18, 2022, 8:45 p.m. OK PyPy 3-64 TESTS 13 139 9113600
181538739 Turtleeee D Nov. 18, 2022, 8:31 p.m. OK PyPy 3-64 TESTS 13 140 8601600
181524728 FrozenKandy D Nov. 18, 2022, 5:53 p.m. OK PyPy 3-64 TESTS 7 140 9011200
181553435 bokunopicolo D Nov. 19, 2022, 2:56 a.m. OK PyPy 3-64 TESTS 13 140 9318400
181558468 MohamedHamed123 D Nov. 19, 2022, 4:28 a.m. OK PyPy 3-64 TESTS 13 140 9523200
181537498 tomasnyberg D Nov. 18, 2022, 8:13 p.m. OK PyPy 3-64 TESTS 13 155 9523200
181516559 anuj_negi D Nov. 18, 2022, 4:59 p.m. OK PyPy 3-64 TESTS 6 155 9932800
181531165 SophieHatter D Nov. 18, 2022, 6:59 p.m. OK PyPy 3-64 TESTS 7 170 10137600
181520742 2momo2 D Nov. 18, 2022, 5:22 p.m. OK Python 3 TESTS 6 93 307200
181526683 farbverlauf D Nov. 18, 2022, 6:11 p.m. OK Python 3 TESTS 7 108 0
181539286 a2bailey D Nov. 18, 2022, 8:41 p.m. OK Python 3 TESTS 13 109 0
181514905 debashishmahanta1 D Nov. 18, 2022, 4:52 p.m. OK Python 3 TESTS 6 140 0
181515834 NarzullayevSaidmurod D Nov. 18, 2022, 4:55 p.m. OK Python 3 TESTS 6 156 0
181515043 NarzullayevSaidmurod D Nov. 18, 2022, 4:52 p.m. OK Python 3 TESTS 6 156 0
181512620 heidary13794 D Nov. 18, 2022, 4:47 p.m. OK Python 3 TESTS 6 156 0
181542161 lucbarn D Nov. 18, 2022, 9:37 p.m. OK Python 3 TESTS 13 234 0
181540436 lorika D Nov. 18, 2022, 9 p.m. OK Python 3 TESTS 13 248 0
181523339 bekeygul D Nov. 18, 2022, 5:41 p.m. OK Python 3 TESTS 6 280 0
181542484 liut D Nov. 18, 2022, 9:44 p.m. OK Rust 2021 TESTS 13 0 0

remove filters

Back to search problems