Codeforces Round 805 (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
1702 Codeforces Round 805 (Div. 3) FINISHED False 8100 74359499 July 10, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 35070 ) A Round Down the Price PROGRAMMING constructive algorithms

B'At the store, the salespeople want to make all prices round. In this problem, a number that is a power of 10 is called a round number. For example, the numbers 10^0 = 1 , 10^1 = 10 , 10^2 = 100 are round numbers, but 20 , 110 and 256 are not round numbers. So, if an item is worth m bourles (the value of the item is not greater than 10^9 ), the sellers want to change its value to the nearest round number that is not greater than m . They ask you: by how many bourles should you decrease the value of the item to make it worth exactly 10^k bourles, where the value of k -- is the maximum possible ( k -- any non-negative integer). For example, let the item have a value of 178 -bourles. Then the new price of the item will be 100 , and the answer will be 178-100=78 . The first line of input data contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases . Each test case is a string containing a single integer m ( 1 <= m <= 10^9 ) -- the price of the item. For each test case, output on a separate line a single integer d ( 0 <= d < m ) such that if you reduce the cost of the item by d bourles, the cost of the item will be the maximal possible round number. More formally: m - d = 10^k , where k -- the maximum possible non-negative integer. In the example: Note that in each test case, we get the maximum possible round number. '...

Tutorials

104763

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
163602134 bluemegane A July 10, 2022, 9:46 p.m. OK C# 8 TESTS 3 124 614400
163614732 zty123 A July 11, 2022, 2:51 a.m. OK Clang++17 Diagnostics TESTS 3 155 0
163592473 carpeOdiem A July 10, 2022, 6:45 p.m. OK Clang++17 Diagnostics TESTS 3 217 1024000
163617704 moly_hhh A July 11, 2022, 3:32 a.m. OK Clang++20 Diagnostics TESTS 3 93 0
163605395 ChilenGaming A July 10, 2022, 11:26 p.m. OK FPC TESTS 3 46 0
163587101 Seif_Elden_Mohamed A July 10, 2022, 5:42 p.m. OK GNU C11 TESTS 3 15 0
163592362 mainuddin_ A July 10, 2022, 6:43 p.m. OK GNU C11 TESTS 3 31 0
163611550 jasonwzz A July 11, 2022, 1:58 a.m. OK GNU C11 TESTS 3 46 0
163584436 E_H_P A July 10, 2022, 5:18 p.m. OK GNU C11 TESTS 3 46 0
163618429 Khalilur_Rahman_Faysal A July 11, 2022, 3:42 a.m. OK GNU C11 TESTS 3 46 0
163622200 Walid238 A July 11, 2022, 4:41 a.m. OK GNU C11 TESTS 3 46 0
163627164 TEEShaks_ A July 11, 2022, 5:45 a.m. OK GNU C11 TESTS 3 46 0
163585322 abhimanyu_raj A July 10, 2022, 5:26 p.m. OK GNU C11 TESTS 3 46 0
163588211 predawn A July 10, 2022, 5:53 p.m. OK GNU C11 TESTS 3 46 0
163593041 adnan_1220 A July 10, 2022, 6:52 p.m. OK GNU C11 TESTS 3 46 0
163602654 pubg_lover_2.0 A July 10, 2022, 10:01 p.m. OK GNU C++14 TESTS 3 0 0
163601012 aliaagheis A July 10, 2022, 9:16 p.m. OK GNU C++14 TESTS 3 0 0
163595116 mohammedisber A July 10, 2022, 7:24 p.m. OK GNU C++14 TESTS 3 0 0
163585763 ZetMino_YT A July 10, 2022, 5:29 p.m. OK GNU C++14 TESTS 3 0 0
163584930 Kevin8502 A July 10, 2022, 5:22 p.m. OK GNU C++14 TESTS 3 0 0
163627017 zycdxxgc A July 11, 2022, 5:43 a.m. OK GNU C++14 TESTS 3 0 0
163627005 jangjie A July 11, 2022, 5:43 a.m. OK GNU C++14 TESTS 3 0 0
163622023 rising_noob A July 11, 2022, 4:39 a.m. OK GNU C++14 TESTS 3 0 0
163616075 MickShow A July 11, 2022, 3:10 a.m. OK GNU C++14 TESTS 3 0 0
163600772 Ismail_Alrefai A July 10, 2022, 9:10 p.m. OK GNU C++14 TESTS 3 0 204800
163619020 Mnesy A July 11, 2022, 3:51 a.m. OK GNU C++17 TESTS 3 0 0
163620101 _Prince A July 11, 2022, 4:08 a.m. OK GNU C++17 TESTS 3 0 0
163620243 NellerP21 A July 11, 2022, 4:10 a.m. OK GNU C++17 TESTS 3 0 0
163620443 shashankssk555 A July 11, 2022, 4:13 a.m. OK GNU C++17 TESTS 3 0 0
163620652 lvhaolin1468 A July 11, 2022, 4:17 a.m. OK GNU C++17 TESTS 3 0 0
163617773 M_A_R A July 11, 2022, 3:33 a.m. OK GNU C++17 TESTS 3 0 0
163616138 sushrut22 A July 11, 2022, 3:11 a.m. OK GNU C++17 TESTS 3 0 0
163610628 Ash-KODES A July 11, 2022, 1:42 a.m. OK GNU C++17 TESTS 3 0 0
163608430 Asamai A July 11, 2022, 12:58 a.m. OK GNU C++17 TESTS 3 0 0
163608981 liuyubobobo A July 11, 2022, 1:10 a.m. OK GNU C++17 TESTS 3 0 0
163597830 Olympia A July 10, 2022, 8:10 p.m. OK GNU C++17 (64) TESTS 3 0 0
163627972 Bom164 A July 11, 2022, 5:53 a.m. OK GNU C++17 (64) TESTS 3 0 0
163617140 ___dreamer__ A July 11, 2022, 3:24 a.m. OK GNU C++17 (64) TESTS 3 0 0
163614856 mrbrown A July 11, 2022, 2:53 a.m. OK GNU C++17 (64) TESTS 3 0 0
163601597 jesse_pinkman_619 A July 10, 2022, 9:32 p.m. OK GNU C++17 (64) TESTS 3 0 0
163597007 rishabhdeepsingh A July 10, 2022, 7:55 p.m. OK GNU C++17 (64) TESTS 3 0 0
163596718 Mohammad_Ayman A July 10, 2022, 7:50 p.m. OK GNU C++17 (64) TESTS 3 0 0
163592297 dewfr0st A July 10, 2022, 6:42 p.m. OK GNU C++17 (64) TESTS 3 0 0
163591910 Adarshgaur A July 10, 2022, 6:36 p.m. OK GNU C++17 (64) TESTS 3 0 0
163589344 noob_coder_29 A July 10, 2022, 6:05 p.m. OK GNU C++17 (64) TESTS 3 0 0
163621784 LuluOwO A July 11, 2022, 4:35 a.m. OK GNU C++20 (64) TESTS 3 0 0
163622886 sd_3009 A July 11, 2022, 4:51 a.m. OK GNU C++20 (64) TESTS 3 0 0
163623329 bedi_1234 A July 11, 2022, 4:57 a.m. OK GNU C++20 (64) TESTS 3 0 0
163624061 C0ldSmi1e A July 11, 2022, 5:06 a.m. OK GNU C++20 (64) TESTS 3 0 0
163624602 dharmesh_kumar A July 11, 2022, 5:14 a.m. OK GNU C++20 (64) TESTS 3 0 0
163625203 Lakshya14 A July 11, 2022, 5:22 a.m. OK GNU C++20 (64) TESTS 3 0 0
163626064 Fear_less A July 11, 2022, 5:33 a.m. OK GNU C++20 (64) TESTS 3 0 0
163626298 chenshengyi A July 11, 2022, 5:35 a.m. OK GNU C++20 (64) TESTS 3 0 0
163627763 Leokkk17 A July 11, 2022, 5:51 a.m. OK GNU C++20 (64) TESTS 3 0 0
163628013 Zesty_GK A July 11, 2022, 5:54 a.m. OK GNU C++20 (64) TESTS 3 0 0
163589259 megabluejay A July 10, 2022, 6:04 p.m. OK Haskell TESTS 3 62 0
163617431 watarimaycry2 A July 11, 2022, 3:28 a.m. OK Java 11 TESTS 3 155 0
163626947 KarMa_ A July 11, 2022, 5:42 a.m. OK Java 11 TESTS 3 171 0
163617618 enviornment A July 11, 2022, 3:30 a.m. OK Java 11 TESTS 3 171 0
163619230 rishabhpanchal A July 11, 2022, 3:54 a.m. OK Java 11 TESTS 3 187 0
163624692 Hitesh_Ahuja A July 11, 2022, 5:15 a.m. OK Java 11 TESTS 3 187 0
163624379 Deepak4466 A July 11, 2022, 5:11 a.m. OK Java 11 TESTS 3 187 0
163617653 Aditya_6174 A July 11, 2022, 3:31 a.m. OK Java 11 TESTS 3 202 0
163584108 Dukkha A July 10, 2022, 5:16 p.m. OK Java 11 TESTS 3 202 0
163628042 Kdheeraj2002 A July 11, 2022, 5:54 a.m. OK Java 11 TESTS 3 217 0
163605875 nis1234 A July 10, 2022, 11:44 p.m. OK Java 11 TESTS 3 218 0
163614115 powerkeke A July 11, 2022, 2:41 a.m. OK Java 17 TESTS 3 202 307200
163592462 Mamimi A July 10, 2022, 6:44 p.m. OK Java 17 TESTS 3 218 0
163587164 umaganesh A July 10, 2022, 5:43 p.m. OK Java 17 TESTS 3 280 614400
163584992 KhadijaBadrawy A July 10, 2022, 5:23 p.m. OK Java 8 TESTS 3 77 0
163623857 Java_Programmer A July 11, 2022, 5:04 a.m. OK Java 8 TESTS 3 93 0
163618336 FirePegasus A July 11, 2022, 3:41 a.m. OK Java 8 TESTS 3 93 0
163602887 AbdelrahmanFathy A July 10, 2022, 10:07 p.m. OK Java 8 TESTS 3 93 0
163602115 WrongAnswerOnTestCase2 A July 10, 2022, 9:46 p.m. OK Java 8 TESTS 3 93 0
163594675 Mohamed_A7med A July 10, 2022, 7:16 p.m. OK Java 8 TESTS 3 93 0
163590007 Sussykin A July 10, 2022, 6:13 p.m. OK Java 8 TESTS 3 93 0
163588243 AhmedEl-Gohary A July 10, 2022, 5:54 p.m. OK Java 8 TESTS 3 93 0
163588249 slow.coder A July 10, 2022, 5:54 p.m. OK Java 8 TESTS 3 108 0
163602009 leonlian A July 10, 2022, 9:44 p.m. OK Java 8 TESTS 3 124 0
163616814 rjbabul2017 A July 11, 2022, 3:20 a.m. OK JavaScript TESTS 3 62 1126400
163583509 mariaskury A July 10, 2022, 5:12 p.m. OK JavaScript TESTS 3 78 2560000
163607067 urke.37 A July 11, 2022, 12:23 a.m. OK MS C++ 2017 TESTS 3 15 0
163606178 CTB220406 A July 10, 2022, 11:54 p.m. OK MS C++ 2017 TESTS 3 15 0
163587521 dmitrySh239 A July 10, 2022, 5:46 p.m. OK MS C++ 2017 TESTS 3 15 0
163603329 bnd1238 A July 10, 2022, 10:20 p.m. OK MS C++ 2017 TESTS 3 31 0
163583322 VadimAk.898 A July 10, 2022, 5:10 p.m. OK MS C++ 2017 TESTS 3 31 102400
163607536 forgotmyhandle A July 11, 2022, 12:37 a.m. OK MS C++ 2017 TESTS 3 46 0
163607424 adfadsfsff A July 11, 2022, 12:34 a.m. OK MS C++ 2017 TESTS 3 46 0
163598802 slaxim A July 10, 2022, 8:29 p.m. OK MS C++ 2017 TESTS 3 46 0
163597744 Ann2006__ A July 10, 2022, 8:09 p.m. OK MS C++ 2017 TESTS 3 46 0
163586207 Bdev0808 A July 10, 2022, 5:33 p.m. OK MS C++ 2017 TESTS 3 46 0
163616706 kwin A July 11, 2022, 3:18 a.m. OK PyPy 3 TESTS 3 109 3584000
163617905 adilet_shymer_2025 A July 11, 2022, 3:35 a.m. OK PyPy 3 TESTS 3 218 3584000
163628589 Bishwanath A July 11, 2022, 6 a.m. OK PyPy 3 TESTS 3 233 3072000
163585350 not_a_spy A July 10, 2022, 5:26 p.m. OK PyPy 3 TESTS 3 233 3584000
163592247 bpdolson A July 10, 2022, 6:41 p.m. OK PyPy 3 TESTS 3 233 4710400
163607251 Mahmoud.Elsantawy A July 11, 2022, 12:29 a.m. OK PyPy 3 TESTS 3 234 3481600
163589602 Sovi_11 A July 10, 2022, 6:08 p.m. OK PyPy 3 TESTS 3 234 5017600
163610949 Youarenotgood A July 11, 2022, 1:48 a.m. OK PyPy 3-64 TESTS 3 77 4403200
163601974 MistaAsh A July 10, 2022, 9:43 p.m. OK PyPy 3-64 TESTS 3 77 4608000
163585810 Sahitya02 A July 10, 2022, 5:30 p.m. OK PyPy 3-64 TESTS 3 108 9216000
163628428 Himanshu_Kaithal A July 11, 2022, 5:59 a.m. OK PyPy 3-64 TESTS 3 124 9318400
163616275 wwwwzhh A July 11, 2022, 3:13 a.m. OK PyPy 3-64 TESTS 3 140 141824000
163592180 mostafa_zahran A July 10, 2022, 6:40 p.m. OK PyPy 3-64 TESTS 3 155 4403200
163588618 Andaloo A July 10, 2022, 5:57 p.m. OK PyPy 3-64 TESTS 3 156 3788800
163604258 M.HasnatFarooq A July 10, 2022, 10:48 p.m. OK PyPy 3-64 TESTS 3 171 3686400
163592794 Tanguyvans A July 10, 2022, 6:49 p.m. OK PyPy 3-64 TESTS 3 171 4403200
163586146 aayush_chhabra A July 10, 2022, 5:33 p.m. OK PyPy 3-64 TESTS 3 171 5017600
163605787 egamberdieva A July 10, 2022, 11:40 p.m. OK Python 3 TESTS 3 61 0
163595092 abel_abate A July 10, 2022, 7:23 p.m. OK Python 3 TESTS 3 77 307200
163583123 bronze_coder A July 10, 2022, 5:09 p.m. OK Python 3 TESTS 3 93 0
163619815 usernamewith24characters A July 11, 2022, 4:03 a.m. OK Python 3 TESTS 3 108 0
163608108 Ouarghui A July 11, 2022, 12:51 a.m. OK Python 3 TESTS 3 108 0
163601584 yarmus A July 10, 2022, 9:32 p.m. OK Python 3 TESTS 3 108 0
163599266 williamcz A July 10, 2022, 8:37 p.m. OK Python 3 TESTS 3 108 0
163588142 sasidhardontu0511 A July 10, 2022, 5:53 p.m. OK Python 3 TESTS 3 108 0
163586348 alpha_96 A July 10, 2022, 5:35 p.m. OK Python 3 TESTS 3 108 0
163586155 yahiamoussadek1 A July 10, 2022, 5:33 p.m. OK Python 3 TESTS 3 108 0
163603277 Ayoub.Aref A July 10, 2022, 10:19 p.m. OK Ruby 3 TESTS 3 249 102400
163584610 yaaaa2k A July 10, 2022, 5:20 p.m. OK Ruby 3 TESTS 3 311 102400
163628530 Sempr A July 11, 2022, 6 a.m. OK Rust 2021 TESTS 3 0 307200
163583015 jakobrs A July 10, 2022, 5:08 p.m. OK Rust 2021 TESTS 3 15 204800

remove filters

Back to search problems