Codeforces Round 382 (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
735 Codeforces Round 382 (Div. 2) FINISHED False 7200 257261123 Nov. 27, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13914 ) D Taxes PROGRAMMING math number theory 1600

B"Mr. Funt now lives in a country with a very specific tax laws. The total income of mr. Funt during this year is equal to n (n xe2 x80 x89 xe2 x89 xa5 xe2 x80 x892) burles and the amount of tax he has to pay is calculated as the maximum divisor of n (not equal to n, of course). For example, if n xe2 x80 x89= xe2 x80 x896 then Funt has to pay 3 burles, while for n xe2 x80 x89= xe2 x80 x8925 he needs to pay 5 and if n xe2 x80 x89= xe2 x80 x892 he pays only 1 burle. As mr. Funt is a very opportunistic person he wants to cheat a bit. In particular, he wants to split the initial n in several parts n1 xe2 x80 x89+ xe2 x80 x89n2 xe2 x80 x89+ xe2 x80 x89... xe2 x80 x89+ xe2 x80 x89nk xe2 x80 x89= xe2 x80 x89n (here k is arbitrary, even k xe2 x80 x89= xe2 x80 x891 is allowed) and pay the taxes for each part separately. He can't make some part equal to 1 because it will reveal him. So, the condition ni xe2 x80 x89 xe2 x89 xa5 xe2 x80 x892 should hold for all i from 1 to k. Ostap Bender wonders, how many money Funt has to pay (i.e. minimal) if he chooses and optimal way to split n in parts. The first line of the input contains a single integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7109) -- the total year income of mr. Funt. Print one integer -- minimum possible number of burles that mr. Funt has to pay as a tax."...

Tutorials

Codeforces Round #382 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
62860938 453908766 D Oct. 18, 2019, 10:47 a.m. OK Clang++17 Diagnostics TESTS 85 46 0 1600
22557298 ruban D Nov. 27, 2016, 7:18 p.m. OK Delphi TESTS 85 15 0 1600
23044263 StarScreamOwl D Dec. 17, 2016, 10:12 a.m. OK Delphi TESTS 85 15 0 1600
29722347 GunDone D Aug. 24, 2017, 5:05 a.m. OK Delphi TESTS 85 15 102400 1600
26377799 nutella- D April 15, 2017, 11:14 a.m. OK Delphi TESTS 85 15 2560000 1600
28718548 libra8z D July 20, 2017, 8:41 a.m. OK Delphi TESTS 85 15 2560000 1600
22654781 prosmgeorg D Dec. 2, 2016, 9:24 a.m. OK FPC TESTS 85 15 0 1600
22627570 alavrov D Nov. 30, 2016, 4:31 p.m. OK FPC TESTS 85 15 0 1600
22626645 yan_lazy D Nov. 30, 2016, 3:41 p.m. OK FPC TESTS 85 15 0 1600
23039821 Gray_58 D Dec. 17, 2016, 5:28 a.m. OK FPC TESTS 85 15 0 1600
22613300 duachuotcc D Nov. 30, 2016, 3:24 a.m. OK FPC TESTS 85 15 0 1600
27002125 The_Winners D May 10, 2017, 7:16 p.m. OK FPC TESTS 85 15 0 1600
27268863 vjudge2 D May 21, 2017, 2:22 p.m. OK FPC TESTS 85 15 0 1600
27268877 somebody_else D May 21, 2017, 2:22 p.m. OK FPC TESTS 85 15 0 1600
22820606 romanfixture1404 D Dec. 8, 2016, 8:14 p.m. OK FPC TESTS 85 15 0 1600
22812994 longNH.IT17 D Dec. 8, 2016, 2:50 p.m. OK FPC TESTS 85 15 0 1600
22878102 Thishandleiscurrent D Dec. 11, 2016, 12:33 p.m. OK GNU C TESTS 85 15 0 1600
22999863 samyak.j D Dec. 15, 2016, 7:35 a.m. OK GNU C TESTS 85 15 0 1600
22943484 betterthanothers D Dec. 14, 2016, 7:24 a.m. OK GNU C TESTS 85 15 0 1600
22877852 A6455 D Dec. 11, 2016, 12:22 p.m. OK GNU C TESTS 85 15 0 1600
22845439 KlzX D Dec. 9, 2016, 10:35 p.m. OK GNU C TESTS 85 15 0 1600
22723927 Mushahid_Shamim D Dec. 6, 2016, 6:13 a.m. OK GNU C TESTS 85 15 0 1600
22676074 f2lk6wf90d D Dec. 3, 2016, 12:04 p.m. OK GNU C TESTS 85 15 0 1600
22668379 xkcd D Dec. 3, 2016, 3:18 a.m. OK GNU C TESTS 85 15 0 1600
22636503 CodeMachine101 D Dec. 1, 2016, 9:59 a.m. OK GNU C TESTS 85 15 0 1600
22629048 RHT_20 D Nov. 30, 2016, 5:56 p.m. OK GNU C TESTS 85 15 0 1600
32345013 HIS D Nov. 16, 2017, 3:07 a.m. OK GNU C++ TESTS 85 15 0 1600
32211722 vjudge3 D Nov. 11, 2017, 6:09 a.m. OK GNU C++ TESTS 85 15 0 1600
32575478 soroushsadeghi D Nov. 23, 2017, 12:47 p.m. OK GNU C++ TESTS 85 15 0 1600
31272170 vjudge4 D Oct. 13, 2017, 11:17 a.m. OK GNU C++ TESTS 85 15 0 1600
31065246 vjudge1 D Oct. 6, 2017, 12:22 p.m. OK GNU C++ TESTS 85 15 0 1600
31064960 vjudge5 D Oct. 6, 2017, 12:12 p.m. OK GNU C++ TESTS 85 15 0 1600
31058839 vjudge4 D Oct. 6, 2017, 7:55 a.m. OK GNU C++ TESTS 85 15 0 1600
30967667 mernazakaria D Oct. 3, 2017, 12:53 p.m. OK GNU C++ TESTS 85 15 0 1600
30421697 south_coder D Sept. 17, 2017, 12:50 p.m. OK GNU C++ TESTS 85 15 0 1600
30023302 vjudge2 D Sept. 3, 2017, 2:58 a.m. OK GNU C++ TESTS 85 15 0 1600
22610256 sk.sayakkundurdx D Nov. 29, 2016, 8:48 p.m. OK GNU C11 TESTS 85 15 0 1600
29790328 Emdadul_Islam D Aug. 25, 2017, 6:50 p.m. OK GNU C11 TESTS 85 15 0 1600
29788362 vjudge5 D Aug. 25, 2017, 5:28 p.m. OK GNU C11 TESTS 85 15 0 1600
27724416 Zahid1558 D June 11, 2017, 4:47 p.m. OK GNU C11 TESTS 85 15 0 1600
23036005 Maanik D Dec. 16, 2016, 9:43 p.m. OK GNU C11 TESTS 85 15 0 1600
22997369 cyclicfunction D Dec. 15, 2016, 5 a.m. OK GNU C11 TESTS 85 15 0 1600
22582209 obhinov D Nov. 28, 2016, 5:34 p.m. OK GNU C11 TESTS 85 15 0 1600
22780939 armandpreda D Dec. 7, 2016, 9:02 a.m. OK GNU C11 TESTS 85 15 1843200 1600
22553244 A.Freeman D Nov. 27, 2016, 6:18 p.m. OK GNU C11 TESTS 85 15 1843200 1600
24544390 vjudge5 D Feb. 9, 2017, 8:27 a.m. OK GNU C11 TESTS 85 15 1843200 1600
30088411 askl1997 D Sept. 5, 2017, 2:09 a.m. OK GNU C++11 TESTS 85 15 0 1600
32194778 Nodir_Bobiev D Nov. 10, 2017, 12:23 p.m. OK GNU C++11 TESTS 85 15 0 1600
32010444 attiw D Nov. 3, 2017, 2:32 p.m. OK GNU C++11 TESTS 85 15 0 1600
30694276 ac_fun D Sept. 25, 2017, 3:18 a.m. OK GNU C++11 TESTS 85 15 0 1600
30581703 pirate_47 D Sept. 21, 2017, 3:07 p.m. OK GNU C++11 TESTS 85 15 0 1600
30260792 minson123 D Sept. 11, 2017, 7:30 a.m. OK GNU C++11 TESTS 85 15 0 1600
29847304 mazicwong D Aug. 28, 2017, 2:07 p.m. OK GNU C++11 TESTS 85 15 0 1600
29845159 animalcoder D Aug. 28, 2017, 12:25 p.m. OK GNU C++11 TESTS 85 15 0 1600
29785941 abhisnalawade98 D Aug. 25, 2017, 3:48 p.m. OK GNU C++11 TESTS 85 15 0 1600
29699762 rahulag1997 D Aug. 23, 2017, 6:56 a.m. OK GNU C++11 TESTS 85 15 0 1600
52313937 Sho10 D April 4, 2019, 4:03 p.m. OK GNU C++14 TESTS 85 15 0 1600
49206643 XLor D Jan. 30, 2019, 2:05 p.m. OK GNU C++14 TESTS 85 15 0 1600
31127192 nurlansofiyev D Oct. 7, 2017, 7:56 p.m. OK GNU C++14 TESTS 85 15 0 1600
31150048 chucha D Oct. 8, 2017, 4:44 p.m. OK GNU C++14 TESTS 85 15 0 1600
31281853 ffern D Oct. 13, 2017, 6:01 p.m. OK GNU C++14 TESTS 85 15 0 1600
31707587 hnam288 D Oct. 25, 2017, 11:50 a.m. OK GNU C++14 TESTS 85 15 0 1600
31773089 L0rdV0ldemort000006 D Oct. 26, 2017, 9:07 p.m. OK GNU C++14 TESTS 85 15 0 1600
31816060 abhinavchoudhary1997 akshay_12001 D Oct. 27, 2017, 6:32 p.m. OK GNU C++14 TESTS 85 15 0 1600
32044299 2166355 D Nov. 4, 2017, 6:39 a.m. OK GNU C++14 TESTS 85 15 0 1600
39453216 Shinjiru D June 21, 2018, 6:43 a.m. OK GNU C++14 TESTS 85 15 0 1600
66660313 __Ash__ D Dec. 12, 2019, 4 a.m. OK GNU C++17 TESTS 85 30 0 1600
64344437 rkumar9648 D Nov. 6, 2019, 5:20 a.m. OK GNU C++17 TESTS 85 30 0 1600
60495993 jonatas57 D Sept. 13, 2019, 4:24 p.m. OK GNU C++17 TESTS 85 30 0 1600
59576451 setulovelegend D Aug. 27, 2019, 2:19 p.m. OK GNU C++17 TESTS 85 30 0 1600
57003586 vjudge4 D July 14, 2019, 5:22 a.m. OK GNU C++17 TESTS 85 30 0 1600
57002970 vjudge2 D July 14, 2019, 4:59 a.m. OK GNU C++17 TESTS 85 30 0 1600
57002856 vjudge4 D July 14, 2019, 4:55 a.m. OK GNU C++17 TESTS 85 30 0 1600
55417697 Raghav1305 D June 11, 2019, 3:59 a.m. OK GNU C++17 TESTS 85 30 0 1600
54462497 _red1_ D May 21, 2019, 7:45 p.m. OK GNU C++17 TESTS 85 30 0 1600
54232945 hv7214 D May 16, 2019, 9:28 a.m. OK GNU C++17 TESTS 85 30 0 1600
36431763 tender D March 20, 2018, noon OK GNU C++17 Diagnostics TESTS 85 1091 99840000 1600
41514468 Rohitdatta D Aug. 12, 2018, 5:02 a.m. OK GNU C++17 Diagnostics TESTS 85 1107 2252800 1600
69082340 Codess D Jan. 19, 2020, 6:57 a.m. OK Java 11 TESTS 85 187 0 1600
64283762 adzo261 D Nov. 5, 2019, 3:36 a.m. OK Java 11 TESTS 85 187 0 1600
69016843 CodAR D Jan. 18, 2020, 5:31 a.m. OK Java 11 TESTS 85 202 0 1600
65799426 lpls1 D Nov. 27, 2019, 6:44 a.m. OK Java 11 TESTS 85 202 0 1600
53317594 yorky D April 26, 2019, 11:17 a.m. OK Java 8 TESTS 85 109 0 1600
66497422 lazypanda D Dec. 8, 2019, 11:07 a.m. OK Java 8 TESTS 85 109 0 1600
65940294 sakt_coder D Nov. 29, 2019, 5:46 a.m. OK Java 8 TESTS 85 109 0 1600
63899672 sonusingh.nitaa D Oct. 31, 2019, 4:36 a.m. OK Java 8 TESTS 85 109 0 1600
54564937 Ikari_stream D May 24, 2019, 3:52 p.m. OK Java 8 TESTS 85 109 0 1600
54465568 hasan5788 D May 21, 2019, 11:06 p.m. OK Java 8 TESTS 85 109 0 1600
52807263 satya26 D April 16, 2019, 5:57 a.m. OK Java 8 TESTS 85 109 0 1600
47704038 llamaoo7 D Dec. 29, 2018, 6:49 p.m. OK Java 8 TESTS 85 109 0 1600
47384226 sameer_hack D Dec. 23, 2018, 2:25 a.m. OK Java 8 TESTS 85 109 0 1600
46820976 deepak4669 D Dec. 9, 2018, 3:16 p.m. OK Java 8 TESTS 85 109 0 1600
22720269 lionvs13 D Dec. 5, 2016, 10:13 p.m. OK JavaScript TESTS 85 31 0 1600
55104044 patilc125 D June 4, 2019, 11:45 p.m. OK Kotlin TESTS 85 155 0 1600
54517721 hibatibati D May 23, 2019, 10:49 a.m. OK Mono C# TESTS 85 46 0 1600
22559950 EvAn D Nov. 27, 2016, 8:36 p.m. OK Mono C# TESTS 85 46 102400 1600
49069300 nemars D Jan. 27, 2019, 7:33 p.m. OK Mono C# TESTS 85 62 0 1600
23407505 Taz D Dec. 29, 2016, 8:48 p.m. OK Mono C# TESTS 85 77 9113600 1600
22702970 supachawal.kullanansiri D Dec. 4, 2016, 11:48 p.m. OK MS C# TESTS 85 46 0 1600
22580661 og.kostya D Nov. 28, 2016, 4:03 p.m. OK MS C# TESTS 85 46 0 1600
22558342 mdarefull D Nov. 27, 2016, 7:36 p.m. OK MS C# TESTS 85 46 0 1600
22568217 pomjuice D Nov. 28, 2016, 7:49 a.m. OK MS C# TESTS 85 46 102400 1600
27008860 xietx D May 11, 2017, 8:51 a.m. OK MS C# TESTS 85 46 102400 1600
22702989 supachawal.kullanansiri D Dec. 4, 2016, 11:52 p.m. OK MS C# TESTS 85 61 0 1600
22665397 bloodbound D Dec. 2, 2016, 8:10 p.m. OK MS C# TESTS 85 61 0 1600
22703019 supachawal.kullanansiri D Dec. 4, 2016, 11:59 p.m. OK MS C# TESTS 85 61 0 1600
22703023 supachawal.kullanansiri D Dec. 5, 2016, midnight OK MS C# TESTS 85 62 0 1600
22703037 supachawal.kullanansiri D Dec. 5, 2016, 12:03 a.m. OK MS C# TESTS 85 62 0 1600
22877513 vjudge3 D Dec. 11, 2016, 12:06 p.m. OK MS C++ TESTS 85 15 0 1600
32505484 O_Ramanujan D Nov. 20, 2017, 4:14 p.m. OK MS C++ TESTS 85 15 0 1600
23049825 Vamig_Aliev D Dec. 17, 2016, 2:37 p.m. OK MS C++ TESTS 85 15 0 1600
22950451 vjudge5 D Dec. 14, 2016, 2:23 p.m. OK MS C++ TESTS 85 15 0 1600
22675746 cTrL D Dec. 3, 2016, 11:48 a.m. OK MS C++ TESTS 85 15 0 1600
22641042 G.HK D Dec. 1, 2016, 1:55 p.m. OK MS C++ TESTS 85 15 0 1600
22638460 vjudge4 D Dec. 1, 2016, 11:59 a.m. OK MS C++ TESTS 85 15 0 1600
22625805 JC_Kiraa D Nov. 30, 2016, 3 p.m. OK MS C++ TESTS 85 15 0 1600
22594503 Dmit_riy D Nov. 29, 2016, 8:49 a.m. OK MS C++ TESTS 85 15 0 1600
22593813 KesaShon D Nov. 29, 2016, 8:01 a.m. OK MS C++ TESTS 85 15 0 1600
49132465 firdbire D Jan. 29, 2019, 5:33 a.m. OK MS C++ 2017 TESTS 85 31 0 1600
49480626 PavelChadnov D Feb. 4, 2019, 10:05 p.m. OK MS C++ 2017 TESTS 85 31 0 1600
49996074 Whirlwind_Matar D Feb. 16, 2019, 3 p.m. OK MS C++ 2017 TESTS 85 31 0 1600
56485151 Schacher97 D July 3, 2019, 5:59 p.m. OK MS C++ 2017 TESTS 85 31 0 1600
65623321 vjudge4 D Nov. 24, 2019, 7:02 a.m. OK MS C++ 2017 TESTS 85 31 0 1600
69194772 CtrlAlt D Jan. 20, 2020, 2:35 p.m. OK MS C++ 2017 TESTS 85 31 307200 1600
65280977 yuanyuan2048 D Nov. 18, 2019, 5:40 a.m. OK MS C++ 2017 TESTS 85 31 307200 1600
55017462 zhuiyi D June 3, 2019, 1:04 p.m. OK MS C++ 2017 TESTS 85 31 1228800 1600
56943492 vjudge3 D July 12, 2019, 8:22 p.m. OK MS C++ 2017 TESTS 85 46 0 1600
57004789 vjudge4 D July 14, 2019, 6:07 a.m. OK MS C++ 2017 TESTS 85 46 0 1600
57150082 mm944 D July 16, 2019, 2:25 p.m. OK PascalABC.NET TESTS 85 326 204800 1600
22558065 battuzz94 D Nov. 27, 2016, 7:30 p.m. OK PyPy 2 TESTS 85 62 0 1600
22558254 battuzz94 D Nov. 27, 2016, 7:34 p.m. OK PyPy 2 TESTS 85 62 0 1600
22560971 Trunks D Nov. 27, 2016, 9:49 p.m. OK PyPy 2 TESTS 85 62 0 1600
22781332 Yash_ D Dec. 7, 2016, 9:23 a.m. OK PyPy 2 TESTS 85 62 22016000 1600
22653762 nealzane D Dec. 2, 2016, 8:05 a.m. OK PyPy 2 TESTS 85 77 0 1600
22561930 abhigupta4 D Nov. 27, 2016, 11:35 p.m. OK PyPy 2 TESTS 85 78 0 1600
22561450 aayush.shah15 D Nov. 27, 2016, 10:37 p.m. OK PyPy 2 TESTS 85 93 0 1600
42151213 YESMAths D Aug. 27, 2018, 12:18 p.m. OK PyPy 2 TESTS 85 124 0 1600
31332232 shub.jain D Oct. 15, 2017, 7:34 a.m. OK PyPy 2 TESTS 85 124 102400 1600
28808609 BenL D July 23, 2017, 9:39 p.m. OK PyPy 2 TESTS 85 140 21913600 1600
27343927 runar.hovland D May 25, 2017, 7:26 p.m. OK PyPy 3 TESTS 85 93 307200 1600
22557098 Vosatorp D Nov. 27, 2016, 7:16 p.m. OK PyPy 3 TESTS 85 108 102400 1600
48381681 vjudge4 D Jan. 14, 2019, 10:50 a.m. OK PyPy 3 TESTS 85 124 0 1600
53003524 vjudge5 D April 19, 2019, 8:25 a.m. OK PyPy 3 TESTS 85 140 0 1600
52913005 vjudge2 D April 17, 2019, 2:46 p.m. OK PyPy 3 TESTS 85 140 0 1600
41557511 prakharmath D Aug. 13, 2018, 12:15 p.m. OK PyPy 3 TESTS 85 140 0 1600
68838968 bharath D Jan. 15, 2020, 4:53 a.m. OK PyPy 3 TESTS 85 140 1228800 1600
67590623 FireBird23 D Dec. 25, 2019, 9:31 a.m. OK PyPy 3 TESTS 85 140 1228800 1600
65510854 Just_a_game_on_your_lips D Nov. 22, 2019, 3:37 a.m. OK PyPy 3 TESTS 85 140 1228800 1600
62663088 mo-hit D Oct. 16, 2019, 6:35 a.m. OK PyPy 3 TESTS 85 140 1228800 1600
22562770 thepotatoranch D Nov. 28, 2016, 1:43 a.m. OK Python 2 TESTS 85 61 0 1600
22589528 kolosp. D Nov. 29, 2016, 1:19 a.m. OK Python 2 TESTS 85 61 921600 1600
22581922 VidurSingh D Nov. 28, 2016, 5:17 p.m. OK Python 2 TESTS 85 61 921600 1600
22552996 swetank D Nov. 27, 2016, 6:17 p.m. OK Python 2 TESTS 85 61 4608000 1600
22808114 gautam14040 D Dec. 8, 2016, 11:10 a.m. OK Python 2 TESTS 85 61 4710400 1600
22663100 SergiiKo D Dec. 2, 2016, 5:48 p.m. OK Python 2 TESTS 85 62 0 1600
22561998 flatline D Nov. 27, 2016, 11:43 p.m. OK Python 2 TESTS 85 62 0 1600
22561000 bryanlys D Nov. 27, 2016, 9:52 p.m. OK Python 2 TESTS 85 62 0 1600
22570153 ovProphet D Nov. 28, 2016, 9:49 a.m. OK Python 2 TESTS 85 62 307200 1600
23079711 relaxneko D Dec. 18, 2016, 8:18 a.m. OK Python 2 TESTS 85 62 409600 1600
27045871 lavafalls D May 12, 2017, 3:25 a.m. OK Python 3 TESTS 85 61 0 1600
22688603 Abdulrahman_Nasser D Dec. 4, 2016, 5:14 a.m. OK Python 3 TESTS 85 61 0 1600
30939259 sharif_42 D Oct. 2, 2017, 10 a.m. OK Python 3 TESTS 85 61 102400 1600
23038508 habibulka D Dec. 17, 2016, 3:19 a.m. OK Python 3 TESTS 85 62 0 1600
22850686 MarcoXerox D Dec. 10, 2016, 8:12 a.m. OK Python 3 TESTS 85 62 0 1600
22719306 heart_less D Dec. 5, 2016, 8:42 p.m. OK Python 3 TESTS 85 62 0 1600
22688624 Abdulrahman_Nasser D Dec. 4, 2016, 5:16 a.m. OK Python 3 TESTS 85 62 0 1600
22667738 Isidev96 D Dec. 3, 2016, 1:14 a.m. OK Python 3 TESTS 85 62 0 1600
22662763 vesko.r.zdravkov D Dec. 2, 2016, 5:30 p.m. OK Python 3 TESTS 85 62 0 1600
22647581 blinovsv D Dec. 1, 2016, 7:52 p.m. OK Python 3 TESTS 85 62 0 1600
22593879 Xquare D Nov. 29, 2016, 8:06 a.m. OK Ruby TESTS 85 62 204800 1600
22557870 PanicStation D Nov. 27, 2016, 7:27 p.m. OK Ruby TESTS 85 77 409600 1600
23771322 Brough D Jan. 12, 2017, 8:52 p.m. OK Ruby TESTS 85 93 6451200 1600
23973451 redchrom D Jan. 19, 2017, 8:17 p.m. OK Ruby TESTS 85 109 6656000 1600
24565913 mio_h D Feb. 10, 2017, 8:50 a.m. OK Rust TESTS 85 15 18329600 1600

remove filters

Back to search problems