Codeforces Round 583 (Div. 1 + Div. 2, based on Olympiad of Metropolises)

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
1214 Codeforces Round 583 (Div. 1 + Div. 2, based on Olympiad of Metropolises) FINISHED False 9000 169592063 Sept. 4, 2019, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9169 ) A Optimal Currency Exchange PROGRAMMING brute force math 1300

B'Andrew was very excited to participate in Olympiad of Metropolises. Days flew by quickly, and Andrew is already at the airport, ready to go home. He has n rubles left, and would like to exchange them to euro and dollar bills. Andrew can mix dollar bills and euro bills in whatever way he wants. The price of one dollar is d rubles, and one euro costs e rubles. Recall that there exist the following dollar bills: 1 , 2 , 5 , 10 , 20 , 50 , 100 , and the following euro bills -- 5 , 10 , 20 , 50 , 100 , 200 (note that, in this problem we do not consider the 500 euro bill, it is hard to find such bills in the currency exchange points). Andrew can buy any combination of bills, and his goal is to minimize the total number of rubles he will have after the exchange. Help him -- write a program that given integers n , e and d , finds the minimum number of rubles Andrew can get after buying dollar and euro bills. The first line of the input contains one integer n ( 1 <= q n <= q 10^8 ) -- the initial sum in rubles Andrew has. The second line of the input contains one integer d ( 30 <= q d <= q 100 ) -- the price of one dollar in rubles. The third line of the input contains integer e ( 30 <= q e <= q 100 ) -- the price of one euro in rubles. Output one integer -- the minimum number of rubles Andrew can have after buying dollar and euro bills optimally. In the first example, we can buy just 1 dollar because there is no 1 euro bill. In the second example, optimal exchange is to buy 5 euro and 1 dollar. In the third example, optimal exchange is to buy 10 dollars in one bill. '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
61740919 cash_me_outside A Oct. 2, 2019, 8:12 p.m. OK Clang++17 Diagnostics TESTS 47 46 0 1300
63258815 vjudge3 A Oct. 23, 2019, 7:17 p.m. OK Clang++17 Diagnostics TESTS 47 46 0 1300
60530101 moshanak A Sept. 14, 2019, 12:02 p.m. OK Clang++17 Diagnostics TESTS 47 61 0 1300
66021032 vjudge1 A Nov. 30, 2019, 7:22 a.m. OK Clang++17 Diagnostics TESTS 47 124 0 1300
63708027 Kewth A Oct. 29, 2019, 9:03 a.m. OK Clang++17 Diagnostics TESTS 47 1294 99328000 1300
62424645 sash0 A Oct. 12, 2019, 1:56 p.m. OK D TESTS 47 46 0 1300
60176723 Denor A Sept. 6, 2019, 2:40 p.m. OK Delphi TESTS 47 31 102400 1300
60066352 Minh2409 A Sept. 5, 2019, 9:16 a.m. OK FPC TESTS 47 31 0 1300
60077924 SangTin A Sept. 5, 2019, 1:07 p.m. OK FPC TESTS 47 31 0 1300
60245392 vjudge2 A Sept. 8, 2019, 2:09 a.m. OK FPC TESTS 47 31 0 1300
60035790 vjudge2 A Sept. 4, 2019, 4:44 p.m. OK FPC TESTS 47 31 0 1300
60305284 cheka A Sept. 9, 2019, 1:38 p.m. OK FPC TESTS 47 46 0 1300
60717827 Atihspi A Sept. 17, 2019, 11:22 a.m. OK GNU C11 TESTS 47 31 0 1300
60915783 Sourav_saha A Sept. 20, 2019, 8:08 a.m. OK GNU C11 TESTS 47 31 0 1300
60940790 vjudge1 A Sept. 20, 2019, 4:59 p.m. OK GNU C11 TESTS 47 31 0 1300
61368782 ashraful1003 A Sept. 27, 2019, 2:20 p.m. OK GNU C11 TESTS 47 31 0 1300
61710681 slindgre A Oct. 2, 2019, 11:22 a.m. OK GNU C11 TESTS 47 31 0 1300
61731358 Richie_richi_rich A Oct. 2, 2019, 4:51 p.m. OK GNU C11 TESTS 47 31 0 1300
62113334 kcharla_21 A Oct. 8, 2019, 12:46 p.m. OK GNU C11 TESTS 47 31 0 1300
62419460 atama A Oct. 12, 2019, 12:31 p.m. OK GNU C11 TESTS 47 31 0 1300
65306140 DevJewel A Nov. 18, 2019, 2:58 p.m. OK GNU C11 TESTS 47 31 0 1300
69910642 mth1908 A Jan. 31, 2020, 3:16 p.m. OK GNU C11 TESTS 47 31 0 1300
62326309 Andrija3 A Oct. 10, 2019, 6:38 p.m. OK GNU C++11 TESTS 47 30 0 1300
60018251 Oxygen. A Sept. 4, 2019, 12:32 p.m. OK GNU C++11 TESTS 47 30 0 1300
60050154 WZYYN A Sept. 4, 2019, 11:45 p.m. OK GNU C++11 TESTS 47 30 0 1300
60054270 Zhanzhe_Lee A Sept. 5, 2019, 3:04 a.m. OK GNU C++11 TESTS 47 30 0 1300
60148440 min25 A Sept. 6, 2019, 2:14 a.m. OK GNU C++11 TESTS 47 30 0 1300
61588810 vjudge2 A Oct. 1, 2019, 6:11 a.m. OK GNU C++11 TESTS 47 30 400793600 1300
69018264 sunchuangyu A Jan. 18, 2020, 5:51 a.m. OK GNU C++11 TESTS 47 31 0 1300
69062691 sd_pt A Jan. 18, 2020, 5:14 p.m. OK GNU C++11 TESTS 47 31 0 1300
69227604 Veasky A Jan. 21, 2020, 8:01 a.m. OK GNU C++11 TESTS 47 31 0 1300
69622392 anderson1208 A Jan. 27, 2020, 2:50 p.m. OK GNU C++11 TESTS 47 31 0 1300
60208423 Ken_He A Sept. 7, 2019, 9:07 a.m. OK GNU C++14 TESTS 47 15 0 1300
68452747 BebekJK A Jan. 9, 2020, 2:56 p.m. OK GNU C++14 TESTS 47 15 0 1300
62916813 Khaled_Mohamed A Oct. 19, 2019, 8:53 a.m. OK GNU C++14 TESTS 47 15 0 1300
62339410 vinhqngo5 A Oct. 11, 2019, 3:58 a.m. OK GNU C++14 TESTS 47 15 0 1300
61231672 pragunsaxena A Sept. 24, 2019, 4:48 p.m. OK GNU C++14 TESTS 47 15 0 1300
60818108 m3h3d1 A Sept. 18, 2019, 9:31 p.m. OK GNU C++14 TESTS 47 15 0 1300
60289218 S.Sino A Sept. 9, 2019, 5:52 a.m. OK GNU C++14 TESTS 47 15 0 1300
60072359 Graph-ix A Sept. 5, 2019, 11:33 a.m. OK GNU C++14 TESTS 47 15 0 1300
60058019 Ibutskhrikidze A Sept. 5, 2019, 5:28 a.m. OK GNU C++14 TESTS 47 15 0 1300
60038989 Ilya-bar A Sept. 4, 2019, 5:41 p.m. OK GNU C++14 TESTS 47 15 0 1300
60054146 edytr A Sept. 5, 2019, 2:58 a.m. OK GNU C++17 TESTS 47 15 0 1300
60065021 ruz A Sept. 5, 2019, 8:45 a.m. OK GNU C++17 TESTS 47 15 0 1300
60073099 Partharora1010 A Sept. 5, 2019, 11:46 a.m. OK GNU C++17 TESTS 47 15 0 1300
60074986 GrandesNegocios A Sept. 5, 2019, 12:19 p.m. OK GNU C++17 TESTS 47 15 0 1300
60306679 NMPatel A Sept. 9, 2019, 2:09 p.m. OK GNU C++17 TESTS 47 15 0 1300
60329541 squirrel123 A Sept. 10, 2019, 4:53 a.m. OK GNU C++17 TESTS 47 15 0 1300
60474211 tung_la_vo_gia A Sept. 13, 2019, 7:12 a.m. OK GNU C++17 TESTS 47 15 0 1300
60701680 mdallrosa A Sept. 17, 2019, 1:14 a.m. OK GNU C++17 TESTS 47 15 0 1300
61398469 NeverRegret A Sept. 28, 2019, 3:54 a.m. OK GNU C++17 TESTS 47 15 0 1300
64704141 mr_agha__seyed A Nov. 11, 2019, 3:50 p.m. OK GNU C++17 TESTS 47 15 0 1300
60330547 Silentselene A Sept. 10, 2019, 5:38 a.m. OK Go TESTS 47 31 0 1300
60070841 congbao A Sept. 5, 2019, 11:04 a.m. OK Go TESTS 47 31 0 1300
60600585 Hale-Ma A Sept. 15, 2019, 7:48 a.m. OK Go TESTS 47 46 0 1300
60072072 NewIdea A Sept. 5, 2019, 11:27 a.m. OK Go TESTS 47 46 0 1300
60653699 reanimatorzon A Sept. 15, 2019, 8:59 p.m. OK Go TESTS 47 61 0 1300
60164692 little_gift A Sept. 6, 2019, 10:26 a.m. OK Haskell TESTS 47 155 59904000 1300
68058693 krutarth07 A Jan. 2, 2020, 12:54 a.m. OK Java 11 TESTS 47 186 0 1300
69631055 alankritanand001 A Jan. 27, 2020, 5:12 p.m. OK Java 11 TESTS 47 202 0 1300
60040912 garg_vibhor A Sept. 4, 2019, 6:18 p.m. OK Java 8 TESTS 47 108 0 1300
67968563 I_love_Harpae A Dec. 30, 2019, 2:11 p.m. OK Java 8 TESTS 47 109 0 1300
66463191 iam_ljk A Dec. 7, 2019, 3:34 p.m. OK Java 8 TESTS 47 109 0 1300
62908789 Oland A Oct. 19, 2019, 6:40 a.m. OK Java 8 TESTS 47 109 0 1300
60742158 ashcodish A Sept. 17, 2019, 9:02 p.m. OK Java 8 TESTS 47 109 0 1300
60741279 kpbochenek A Sept. 17, 2019, 8:17 p.m. OK Java 8 TESTS 47 109 0 1300
60695468 Oopsimbad A Sept. 16, 2019, 7:26 p.m. OK Java 8 TESTS 47 109 0 1300
60497856 xacto A Sept. 13, 2019, 5:09 p.m. OK Java 8 TESTS 47 109 0 1300
60493870 HedinAllholder A Sept. 13, 2019, 3:33 p.m. OK Java 8 TESTS 47 109 0 1300
60488885 Patwari26 A Sept. 13, 2019, 1:43 p.m. OK Java 8 TESTS 47 109 0 1300
60050203 sjx233 A Sept. 4, 2019, 11:48 p.m. OK JavaScript TESTS 47 31 102400 1300
60082618 mongolrgata A Sept. 5, 2019, 2:33 p.m. OK JavaScript TESTS 47 46 204800 1300
60221605 mishagam A Sept. 7, 2019, 1:48 p.m. OK Kotlin TESTS 47 124 0 1300
60024537 Fortin A Sept. 4, 2019, 1:52 p.m. OK Kotlin TESTS 47 124 0 1300
60024237 Fortin A Sept. 4, 2019, 1:48 p.m. OK Kotlin TESTS 47 139 0 1300
60067828 rego97 A Sept. 5, 2019, 9:53 a.m. OK Kotlin TESTS 47 139 0 1300
69719338 lucifer1004 A Jan. 29, 2020, 10:05 a.m. OK Kotlin TESTS 47 139 204800 1300
60160039 ganixdd A Sept. 6, 2019, 8:37 a.m. OK Kotlin TESTS 47 140 0 1300
60026512 Benq A Sept. 4, 2019, 2:18 p.m. OK Kotlin TESTS 47 140 0 1300
60017661 XinLoiNguoi A Sept. 4, 2019, 12:26 p.m. OK Kotlin TESTS 47 140 0 1300
60263717 vadimmm A Sept. 8, 2019, 12:36 p.m. OK Kotlin TESTS 47 140 0 1300
60379801 dkozak94 A Sept. 11, 2019, 8:32 a.m. OK Kotlin TESTS 47 140 204800 1300
60169133 NiggaPony A Sept. 6, 2019, 12:11 p.m. OK Mono C# TESTS 47 46 0 1300
61210160 nadilk A Sept. 24, 2019, 11:14 a.m. OK Mono C# TESTS 47 46 0 1300
61119217 Salatik231166 A Sept. 23, 2019, 1:52 p.m. OK Mono C# TESTS 47 46 0 1300
60020632 Giangvp A Sept. 4, 2019, 1:01 p.m. OK Mono C# TESTS 47 61 0 1300
60044779 m1_k3 A Sept. 4, 2019, 7:52 p.m. OK Mono C# TESTS 47 62 0 1300
60269040 Goga A Sept. 8, 2019, 2:37 p.m. OK Mono C# TESTS 47 62 0 1300
61566281 Xtreemist A Sept. 30, 2019, 5:11 p.m. OK Mono C# TESTS 47 62 0 1300
60937703 and999 A Sept. 20, 2019, 3:56 p.m. OK Mono C# TESTS 47 62 0 1300
60478104 ansergeyg A Sept. 13, 2019, 9:12 a.m. OK Mono C# TESTS 47 62 0 1300
60161233 og.kostya A Sept. 6, 2019, 9:04 a.m. OK Mono C# TESTS 47 62 0 1300
66021285 vjudge3 A Nov. 30, 2019, 7:26 a.m. OK MS C++ TESTS 47 30 0 1300
66022534 vjudge2 A Nov. 30, 2019, 7:47 a.m. OK MS C++ TESTS 47 31 0 1300
66022054 vjudge3 A Nov. 30, 2019, 7:39 a.m. OK MS C++ TESTS 47 31 0 1300
66026775 vjudge3 A Nov. 30, 2019, 8:55 a.m. OK MS C++ TESTS 47 31 0 1300
66026421 vjudge5 A Nov. 30, 2019, 8:50 a.m. OK MS C++ TESTS 47 31 0 1300
66026181 vjudge5 A Nov. 30, 2019, 8:45 a.m. OK MS C++ TESTS 47 31 0 1300
66024966 vjudge4 A Nov. 30, 2019, 8:26 a.m. OK MS C++ TESTS 47 31 0 1300
66023802 vjudge1 A Nov. 30, 2019, 8:07 a.m. OK MS C++ TESTS 47 31 0 1300
66023270 vjudge3 A Nov. 30, 2019, 7:59 a.m. OK MS C++ TESTS 47 31 0 1300
66022764 vjudge4 A Nov. 30, 2019, 7:50 a.m. OK MS C++ TESTS 47 31 0 1300
61381457 JuicyCloud12609 A Sept. 27, 2019, 5:37 p.m. OK MS C++ 2017 TESTS 47 31 0 1300
66024154 vjudge4 A Nov. 30, 2019, 8:12 a.m. OK MS C++ 2017 TESTS 47 31 0 1300
66020091 vjudge5 A Nov. 30, 2019, 7:03 a.m. OK MS C++ 2017 TESTS 47 31 0 1300
62638272 kurs A Oct. 15, 2019, 5:25 p.m. OK MS C++ 2017 TESTS 47 31 0 1300
62042764 acscript A Oct. 7, 2019, 6:31 a.m. OK MS C++ 2017 TESTS 47 31 0 1300
61589452 vjudge1 A Oct. 1, 2019, 6:26 a.m. OK MS C++ 2017 TESTS 47 31 0 1300
61212470 dundae A Sept. 24, 2019, 11:52 a.m. OK MS C++ 2017 TESTS 47 31 0 1300
60842540 ChaLemon A Sept. 19, 2019, 11:29 a.m. OK MS C++ 2017 TESTS 47 31 0 1300
60728419 Ruslan376 A Sept. 17, 2019, 2:46 p.m. OK MS C++ 2017 TESTS 47 31 0 1300
60693384 Yarema.st A Sept. 16, 2019, 6:21 p.m. OK MS C++ 2017 TESTS 47 31 0 1300
60495016 pascal_handle A Sept. 13, 2019, 3:59 p.m. OK PascalABC.NET TESTS 47 202 0 1300
60034095 mayakin A Sept. 4, 2019, 4:14 p.m. OK PHP TESTS 47 46 0 1300
61200670 graceoflives A Sept. 24, 2019, 7:38 a.m. OK PHP TESTS 47 46 0 1300
60136588 anshuman16423 A Sept. 5, 2019, 6:28 p.m. OK PyPy 2 TESTS 47 124 102400 1300
60048079 angoncal A Sept. 4, 2019, 9:50 p.m. OK PyPy 2 TESTS 47 124 102400 1300
60027125 bertrandovide A Sept. 4, 2019, 2:26 p.m. OK PyPy 2 TESTS 47 124 204800 1300
60032911 alexwice A Sept. 4, 2019, 3:54 p.m. OK PyPy 2 TESTS 47 140 204800 1300
60037234 snape_here A Sept. 4, 2019, 5:10 p.m. OK PyPy 3 TESTS 47 139 1228800 1300
60023495 nadchu A Sept. 4, 2019, 1:38 p.m. OK PyPy 3 TESTS 47 140 0 1300
67192315 ng24_7 A Dec. 19, 2019, 7:36 a.m. OK PyPy 3 TESTS 47 140 1228800 1300
67013486 vinuthegr8 A Dec. 16, 2019, 10:42 a.m. OK PyPy 3 TESTS 47 140 1228800 1300
62306835 kgmkr00001 A Oct. 10, 2019, 1:25 p.m. OK PyPy 3 TESTS 47 140 1228800 1300
62260695 neeKILL skyscraper A Oct. 10, 2019, 12:08 p.m. OK PyPy 3 TESTS 47 140 1228800 1300
60878403 vishhesh A Sept. 19, 2019, 3:50 p.m. OK PyPy 3 TESTS 47 140 1228800 1300
60802038 bharathsathya A Sept. 18, 2019, 5:13 p.m. OK PyPy 3 TESTS 47 140 1228800 1300
60504537 KINGZJ A Sept. 13, 2019, 8:35 p.m. OK PyPy 3 TESTS 47 140 1228800 1300
60404315 Nister A Sept. 11, 2019, 5:57 p.m. OK PyPy 3 TESTS 47 140 1228800 1300
60037488 eugalt A Sept. 4, 2019, 5:15 p.m. OK Python 2 TESTS 47 264 10854400 1300
60037244 eugalt A Sept. 4, 2019, 5:10 p.m. OK Python 2 TESTS 47 265 10854400 1300
60076344 tutuhu A Sept. 5, 2019, 12:42 p.m. OK Python 2 TESTS 47 327 10854400 1300
60458881 royrishabh A Sept. 12, 2019, 7:25 p.m. OK Python 2 TESTS 47 545 54169600 1300
60058878 phoenix28 A Sept. 5, 2019, 5:55 a.m. OK Python 2 TESTS 47 670 16384000 1300
60027579 ChaosAngel A Sept. 4, 2019, 2:33 p.m. OK Python 3 TESTS 47 109 307200 1300
61708260 pmila_21 A Oct. 2, 2019, 10:47 a.m. OK Python 3 TESTS 47 124 0 1300
60965144 2005_shakula A Sept. 21, 2019, 6:47 a.m. OK Python 3 TESTS 47 124 0 1300
60358930 UR5ANO A Sept. 10, 2019, 5:22 p.m. OK Python 3 TESTS 47 124 0 1300
60244824 orailly A Sept. 8, 2019, 1:29 a.m. OK Python 3 TESTS 47 124 0 1300
60243628 nealzane A Sept. 7, 2019, 11:46 p.m. OK Python 3 TESTS 47 124 0 1300
68004355 alibek_lfc A Dec. 31, 2019, 12:27 p.m. OK Python 3 TESTS 47 280 307200 1300
60040018 LintuStorm A Sept. 4, 2019, 6:01 p.m. OK Python 3 TESTS 47 296 0 1300
61708881 ahugh A Oct. 2, 2019, 10:57 a.m. OK Python 3 TESTS 47 327 0 1300
60028166 vegetablesandwich A Sept. 4, 2019, 2:41 p.m. OK Python 3 TESTS 47 342 0 1300
60415846 nemi_zzz A Sept. 12, 2019, 2:06 a.m. OK Ruby TESTS 47 373 0 1300
63267408 Anai A Oct. 24, 2019, 1:21 a.m. OK Rust TESTS 47 31 0 1300
60470263 chinmaykousik1 A Sept. 13, 2019, 5:02 a.m. OK Rust TESTS 47 31 0 1300
60042708 sansen A Sept. 4, 2019, 6:57 p.m. OK Rust TESTS 47 31 0 1300
60358925 tpoeiras A Sept. 10, 2019, 5:22 p.m. OK Rust TESTS 47 46 0 1300
60018702 limed A Sept. 4, 2019, 12:36 p.m. OK Scala TESTS 47 483 0 1300

remove filters

Back to search problems