Codeforces Round 777 (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
1647 Codeforces Round 777 (Div. 2) FINISHED False 7200 84813899 March 11, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22824 ) A Madoka and Math Dad PROGRAMMING implementation math

B"Madoka finally found the administrator password for her computer. Her father is a well-known popularizer of mathematics, so the password is the answer to the following problem. Find the maximum decimal number without zeroes and with no equal digits in a row, such that the sum of its digits is n . Madoka is too tired of math to solve it herself, so help her to solve this problem! Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Description of the test cases follows. The only line of each test case contains an integer n ( 1 <= n <= 1000 ) -- the required sum of the digits. For each test case print the maximum number you can obtain. The only numbers with the sum of digits equal to 2 without zeros are 2 and 11 . But the last one has two ones in a row, so it's not valid. That's why the answer is 2 . The only numbers with the sum of digits equal to 3 without zeros are 111 , 12 , 21 , and 3 . The first one has 2 ones in a row, so it's not valid. So the maximum valid number is 21 . The only numbers with the sum of digits equals to 4 without zeros are 1111 , 211 , 121 , 112 , 13 , 31 , 22 , and 4 . Numbers 1111 , 211 , 112 , 22 aren't valid, because they have some identical digits in a row. So the maximum valid number is 121 . "...

Tutorials

Codeforces Round #777 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
149379410 Monster-cat A March 12, 2022, 5:25 a.m. OK Clang++17 Diagnostics TESTS 3 62 3174400
149375752 Zeeyoung A March 12, 2022, 4:35 a.m. OK Clang++17 Diagnostics TESTS 3 124 0
149329735 Gassa A March 11, 2022, 5:03 p.m. OK D TESTS 3 30 204800
149337078 1435730 A March 11, 2022, 5:36 p.m. OK GNU C11 TESTS 3 15 0
149316290 fanxingzaoyue A March 11, 2022, 4:14 p.m. OK GNU C11 TESTS 3 31 0
149344774 dianzikejidaxue A March 11, 2022, 6:17 p.m. OK GNU C11 TESTS 3 31 0
149348440 Pawan_Lahoti A March 11, 2022, 6:52 p.m. OK GNU C11 TESTS 3 31 0
149328233 1435730 A March 11, 2022, 4:54 p.m. OK GNU C11 TESTS 3 46 0
149367851 hnust_gongkai A March 12, 2022, 2:25 a.m. OK GNU C11 TESTS 3 171 0
149343781 Sikari A March 11, 2022, 6:09 p.m. OK GNU C++14 TESTS 3 0 0
149340001 Owl_Knight A March 11, 2022, 5:47 p.m. OK GNU C++14 TESTS 3 0 0
149331338 Sagar2023 A March 11, 2022, 5:06 p.m. OK GNU C++14 TESTS 3 0 0
149329514 cymn A March 11, 2022, 5:02 p.m. OK GNU C++14 TESTS 3 0 0
149322131 savaliyadishant3 A March 11, 2022, 4:30 p.m. OK GNU C++14 TESTS 3 0 0
149313447 phanquangminh070707 A March 11, 2022, 4:06 p.m. OK GNU C++14 TESTS 3 0 0
149371718 dbkx_29 A March 12, 2022, 3:22 a.m. OK GNU C++14 TESTS 3 0 0
149344660 abhii_7 A March 11, 2022, 6:16 p.m. OK GNU C++14 TESTS 3 0 0
149371938 Lotuses A March 12, 2022, 3:26 a.m. OK GNU C++14 TESTS 3 0 0
149372634 rishabh2003 A March 12, 2022, 3:39 a.m. OK GNU C++14 TESTS 3 0 0
149374532 abhishekranjan_306 A March 12, 2022, 4:15 a.m. OK GNU C++17 TESTS 3 0 0
149372452 _bverma512 A March 12, 2022, 3:36 a.m. OK GNU C++17 TESTS 3 0 0
149364677 Yfan_ A March 12, 2022, 1:04 a.m. OK GNU C++17 TESTS 3 0 0
149359899 IanAbusa A March 11, 2022, 9:52 p.m. OK GNU C++17 TESTS 3 0 0
149357033 chandryan_12 A March 11, 2022, 8:51 p.m. OK GNU C++17 TESTS 3 0 0
149356781 assem_albitar A March 11, 2022, 8:46 p.m. OK GNU C++17 TESTS 3 0 0
149378693 namangpt A March 12, 2022, 5:16 a.m. OK GNU C++17 TESTS 3 0 0
149381103 hzhu378 A March 12, 2022, 5:47 a.m. OK GNU C++17 TESTS 3 0 0
149375273 DiptoArchyes07 A March 12, 2022, 4:27 a.m. OK GNU C++17 TESTS 3 0 0
149375125 nahid36 A March 12, 2022, 4:25 a.m. OK GNU C++17 TESTS 3 0 0
149360408 slavi1337 A March 11, 2022, 10:06 p.m. OK GNU C++17 (64) TESTS 3 0 0
149372346 zykkezi A March 12, 2022, 3:34 a.m. OK GNU C++17 (64) TESTS 3 0 0
149360464 kal013 A March 11, 2022, 10:07 p.m. OK GNU C++17 (64) TESTS 3 0 0
149332022 moscars A March 11, 2022, 5:10 p.m. OK GNU C++17 (64) TESTS 3 0 0
149363434 snailuu A March 12, 2022, 12:18 a.m. OK GNU C++17 (64) TESTS 3 0 2048000
149373493 Messywind A March 12, 2022, 3:56 a.m. OK GNU C++17 (64) TESTS 3 15 0
149373830 mangoDD A March 12, 2022, 4:02 a.m. OK GNU C++17 (64) TESTS 3 15 0
149375149 takeuchi-masaki A March 12, 2022, 4:25 a.m. OK GNU C++17 (64) TESTS 3 15 0
149377921 a_ntike A March 12, 2022, 5:06 a.m. OK GNU C++17 (64) TESTS 3 15 0
149379033 chmpy A March 12, 2022, 5:20 a.m. OK GNU C++17 (64) TESTS 3 15 0
149367030 dqk A March 12, 2022, 2:08 a.m. OK GNU C++20 (64) TESTS 3 0 0
149365892 CaoTienDat A March 12, 2022, 1:40 a.m. OK GNU C++20 (64) TESTS 3 0 0
149356322 _WATerror_AK A March 11, 2022, 8:38 p.m. OK GNU C++20 (64) TESTS 3 0 0
149352802 Try_Fail_Learn_Repeat A March 11, 2022, 7:43 p.m. OK GNU C++20 (64) TESTS 3 0 0
149352078 Gaming A March 11, 2022, 7:34 p.m. OK GNU C++20 (64) TESTS 3 0 0
149377127 tiasmondal A March 12, 2022, 4:55 a.m. OK GNU C++20 (64) TESTS 3 0 0
149375294 ccttt A March 12, 2022, 4:27 a.m. OK GNU C++20 (64) TESTS 3 0 0
149374112 swz A March 12, 2022, 4:08 a.m. OK GNU C++20 (64) TESTS 3 0 0
149368065 chitransh_itbhu_6102003 A March 12, 2022, 2:30 a.m. OK GNU C++20 (64) TESTS 3 0 0
149368049 WA_King A March 12, 2022, 2:30 a.m. OK GNU C++20 (64) TESTS 3 0 0
149331905 rcamposnunes A March 11, 2022, 5:09 p.m. OK Go TESTS 3 46 2764800
149371606 MinhMinh09 A March 12, 2022, 3:21 a.m. OK Go TESTS 3 140 5017600
149341718 RagedKnight A March 11, 2022, 5:50 p.m. OK Java 11 TESTS 3 140 0
149342614 ritu_1 A March 11, 2022, 5:59 p.m. OK Java 11 TESTS 3 156 0
149365648 iamavalon A March 12, 2022, 1:34 a.m. OK Java 11 TESTS 3 170 0
149341627 Guleri24 A March 11, 2022, 5:49 p.m. OK Java 11 TESTS 3 170 0
149341806 suhas5979 A March 11, 2022, 5:51 p.m. OK Java 11 TESTS 3 171 0
149365339 Never_Give_Up_Mani A March 12, 2022, 1:25 a.m. OK Java 11 TESTS 3 171 0
149345189 BhargavModha A March 11, 2022, 6:20 p.m. OK Java 11 TESTS 3 171 0
149363824 EDCTY A March 12, 2022, 12:32 a.m. OK Java 11 TESTS 3 186 0
149349730 Maroon512 A March 11, 2022, 7:07 p.m. OK Java 11 TESTS 3 186 0
149329844 MindSlayer A March 11, 2022, 5:04 p.m. OK Java 11 TESTS 3 186 0
149344346 Kritika717 A March 11, 2022, 6:13 p.m. OK Java 8 TESTS 3 93 0
149339127 di_halt A March 11, 2022, 5:40 p.m. OK Java 8 TESTS 3 93 0
149349515 soulnote A March 11, 2022, 7:04 p.m. OK Java 8 TESTS 3 93 0
149339625 di_halt A March 11, 2022, 5:44 p.m. OK Java 8 TESTS 3 108 0
149355961 kocko A March 11, 2022, 8:31 p.m. OK Java 8 TESTS 3 108 0
149348055 vikaspanwar11 A March 11, 2022, 6:48 p.m. OK Java 8 TESTS 3 108 0
149332413 rdinda A March 11, 2022, 5:12 p.m. OK Java 8 TESTS 3 109 0
149345284 vikaspanwar11 A March 11, 2022, 6:21 p.m. OK Java 8 TESTS 3 109 0
149374616 govindrajput A March 12, 2022, 4:16 a.m. OK Java 8 TESTS 3 124 0
149376771 ak_ankit_ A March 12, 2022, 4:50 a.m. OK Java 8 TESTS 3 124 0
149331312 Triss_Merigold A March 11, 2022, 5:06 p.m. OK Kotlin 1.5 TESTS 3 170 0
149349527 SlavaG A March 11, 2022, 7:04 p.m. OK Kotlin 1.5 TESTS 3 217 0
149342051 nesco A March 11, 2022, 5:53 p.m. OK Mono C# TESTS 3 156 3174400
149342410 nesco A March 11, 2022, 5:57 p.m. OK Mono C# TESTS 3 327 3174400
149357662 Tanish69 A March 11, 2022, 9:03 p.m. OK MS C++ 2017 TESTS 3 15 0
149335293 AMRO404 A March 11, 2022, 5:22 p.m. OK MS C++ 2017 TESTS 3 15 0
149364609 hnust_wunengwu A March 12, 2022, 1:01 a.m. OK MS C++ 2017 TESTS 3 15 819200
149332234 MOHAMED_SHEHTA_HASSAN A March 11, 2022, 5:11 p.m. OK MS C++ 2017 TESTS 3 30 0
149356254 Fowg A March 11, 2022, 8:36 p.m. OK MS C++ 2017 TESTS 3 31 0
149356336 Fowg A March 11, 2022, 8:38 p.m. OK MS C++ 2017 TESTS 3 31 0
149363024 Orange_Gong A March 12, 2022, 12:02 a.m. OK MS C++ 2017 TESTS 3 62 0
149321035 heavier_fire A March 11, 2022, 4:27 p.m. OK MS C++ 2017 TESTS 3 140 0
149314347 weallxz A March 11, 2022, 4:09 p.m. OK MS C++ 2017 TESTS 3 156 0
149314288 Layk A March 11, 2022, 4:09 p.m. OK MS C++ 2017 TESTS 3 156 0
149342699 nesco A March 11, 2022, 6 p.m. OK .NET Core C# TESTS 3 108 3072000
149316826 aldi.setiawan A March 11, 2022, 4:16 p.m. OK .NET Core C# TESTS 3 186 3379200
149331915 1_2_3_4_5_9 A March 11, 2022, 5:09 p.m. OK PyPy 2 TESTS 3 108 3481600
149342221 feelme A March 11, 2022, 5:55 p.m. OK PyPy 3 TESTS 3 93 3481600
149348556 kwin A March 11, 2022, 6:53 p.m. OK PyPy 3 TESTS 3 108 3481600
149375031 kuanc A March 12, 2022, 4:23 a.m. OK PyPy 3 TESTS 3 139 2560000
149351513 rudrashah A March 11, 2022, 7:27 p.m. OK PyPy 3 TESTS 3 155 2560000
149317585 BigNerd24 A March 11, 2022, 4:18 p.m. OK PyPy 3 TESTS 3 155 5632000
149367074 Midhilesh A March 12, 2022, 2:08 a.m. OK PyPy 3 TESTS 3 170 2764800
149353650 MohaMedFRy A March 11, 2022, 7:55 p.m. OK PyPy 3 TESTS 3 171 3788800
149345779 definisto A March 11, 2022, 6:26 p.m. OK PyPy 3 TESTS 3 186 4300800
149372970 59ri A March 12, 2022, 3:46 a.m. OK PyPy 3 TESTS 3 187 4403200
149360605 YouCanCallMeNoob A March 11, 2022, 10:12 p.m. OK PyPy 3 TESTS 3 187 5222400
149346170 nitish420 A March 11, 2022, 6:29 p.m. OK PyPy 3-64 TESTS 3 61 4608000
149366572 DippleThree A March 12, 2022, 1:57 a.m. OK PyPy 3-64 TESTS 3 77 4198400
149378257 notTehlka A March 12, 2022, 5:11 a.m. OK PyPy 3-64 TESTS 3 93 6758400
149328208 lynnerva A March 11, 2022, 4:54 p.m. OK PyPy 3-64 TESTS 3 109 3788800
149369748 nch0216 A March 12, 2022, 2:44 a.m. OK PyPy 3-64 TESTS 3 109 4300800
149365654 1DG A March 12, 2022, 1:34 a.m. OK PyPy 3-64 TESTS 3 124 4403200
149335792 dvaravind A March 11, 2022, 5:26 p.m. OK PyPy 3-64 TESTS 3 124 5324800
149373581 Tao1925 A March 12, 2022, 3:58 a.m. OK PyPy 3-64 TESTS 3 139 2867200
149366458 SmuggingSpon A March 12, 2022, 1:54 a.m. OK PyPy 3-64 TESTS 3 139 4198400
149362700 Conjecture34 A March 11, 2022, 11:47 p.m. OK PyPy 3-64 TESTS 3 139 4300800
149331630 Su_123 A March 11, 2022, 5:08 p.m. OK Python 3 TESTS 3 31 0
149317274 Devansh_10 A March 11, 2022, 4:17 p.m. OK Python 3 TESTS 3 31 0
149376489 harshk_52 A March 12, 2022, 4:46 a.m. OK Python 3 TESTS 3 46 0
149375480 theKtulu A March 12, 2022, 4:30 a.m. OK Python 3 TESTS 3 46 0
149370986 hzzzzzzq A March 12, 2022, 3:09 a.m. OK Python 3 TESTS 3 46 0
149366422 Ghulam_Junaid A March 12, 2022, 1:53 a.m. OK Python 3 TESTS 3 46 0
149351494 Afsan_Habib A March 11, 2022, 7:27 p.m. OK Python 3 TESTS 3 46 0
149328952 rajn5181 A March 11, 2022, 4:58 p.m. OK Python 3 TESTS 3 46 0
149318744 harshit.1rn19ec055 A March 11, 2022, 4:21 p.m. OK Python 3 TESTS 3 46 0
149328638 person_exe A March 11, 2022, 4:56 p.m. OK Python 3 TESTS 3 46 0

remove filters

Back to search problems