Codeforces Round 641 (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
1350 Codeforces Round 641 (Div. 2) FINISHED False 9000 142536299 May 12, 2020, 12:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 26143 ) A Orac and Factors PROGRAMMING math 900

B'Orac is studying number theory, and he is interested in the properties of divisors. For two positive integers a and b , a is a divisor of b if and only if there exists an integer c , such that a cdot c=b . For n ge 2 , we will denote as f(n) the smallest positive divisor of n , except 1 . For example, f(7)=7,f(10)=2,f(35)=5 . For the fixed integer n , Orac decided to add f(n) to n . For example, if he had an integer n=5 , the new value of n will be equal to 10 . And if he had an integer n=6 , n will be changed to 8 . Orac loved it so much, so he decided to repeat this operation several times. Now, for two positive integers n and k , Orac asked you to add f(n) to n exactly k times (note that n will change after each operation, so f(n) may change too) and tell him the final value of n . For example, if Orac gives you n=5 and k=2 , at first you should add f(5)=5 to n=5 , so your new value of n will be equal to n=10 , after that, you should add f(10)=2 to 10 , so your new (and the final!) value of n will be equal to 12 . Orac may ask you these queries many times. The first line of the input is a single integer t (1 <= t <= 100) : the number of times that Orac will ask you. Each of the next t lines contains two positive integers n,k (2 <= n <= 10^6, 1 <= k <= 10^9) , corresponding to a query by Orac. It is guaranteed that the total sum of n is at most 10^6 . Print t lines, the i -th of them should contain the final value of n in the i -th query by Orac. In the first query, n=5 and k=1 . The divisors of 5 are 1 and 5 , the smallest one except 1 is 5 . Therefore, the only operation adds f(5)=5 to 5 , and the result is 10 . In the second query, n=8$$'...

Tutorials

Codeforces Round #641 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
80575820 ehsanoo A May 18, 2020, 6:41 a.m. OK D TESTS 40 62 10342400 900
80245644 zskull A May 15, 2020, 4:38 p.m. OK GNU C11 TESTS 40 15 3686400 900
79927393 yezster A May 12, 2020, 10:44 p.m. OK GNU C11 TESTS 40 15 3686400 900
79965305 Mayeesha30 A May 13, 2020, 9:50 a.m. OK GNU C11 TESTS 40 15 3686400 900
79920967 samarthsachan5 A May 12, 2020, 8:12 p.m. OK GNU C11 TESTS 40 15 3891200 900
80952249 igmyeongyoon A May 22, 2020, 4:21 p.m. OK GNU C11 TESTS 40 30 0 900
80625608 dumb_coder323 A May 18, 2020, 5:06 p.m. OK GNU C11 TESTS 40 30 0 900
80816698 nitinkumar1729 A May 21, 2020, 3:08 a.m. OK GNU C11 TESTS 40 30 204800 900
80222183 avi_p A May 15, 2020, 11:58 a.m. OK GNU C11 TESTS 40 30 3686400 900
80471865 Zuairia_Raisa A May 17, 2020, 9:46 a.m. OK GNU C11 TESTS 40 30 3686400 900
80452584 pragya_katiyar A May 17, 2020, 9:01 a.m. OK GNU C11 TESTS 40 30 3686400 900
81364923 touhed A May 25, 2020, 8:56 a.m. OK GNU C++11 TESTS 40 15 0 900
81069494 AyushMishra A May 24, 2020, 5:06 a.m. OK GNU C++11 TESTS 40 15 0 900
81054372 lhxQAQ A May 24, 2020, 1:17 a.m. OK GNU C++11 TESTS 40 15 204800 900
80028813 xing20tong A May 14, 2020, 3:44 a.m. OK GNU C++11 TESTS 40 15 3686400 900
80197503 souravunni27 A May 15, 2020, 6:40 a.m. OK GNU C++11 TESTS 40 15 3891200 900
79909755 aayuagarwal A May 12, 2020, 5:42 p.m. OK GNU C++11 TESTS 40 15 3891200 900
80002222 anton.hola A May 13, 2020, 4:38 p.m. OK GNU C++11 TESTS 40 15 3891200 900
80390428 annnnirudh A May 16, 2020, 3:52 p.m. OK GNU C++11 TESTS 40 15 3891200 900
80388027 atwood A May 16, 2020, 3:33 p.m. OK GNU C++11 TESTS 40 15 3891200 900
80255037 Abir0307 A May 15, 2020, 6:42 p.m. OK GNU C++11 TESTS 40 15 3891200 900
79922528 SilverFire A May 12, 2020, 8:39 p.m. OK GNU C++14 TESTS 40 15 11980800 900
80880378 xpov1LL A May 21, 2020, 6:31 p.m. OK GNU C++14 TESTS 40 30 307200 900
79955274 iakshat A May 13, 2020, 7:48 a.m. OK GNU C++14 TESTS 40 30 3686400 900
80244557 SAJIB.. A May 15, 2020, 4:25 p.m. OK GNU C++14 TESTS 40 30 3686400 900
79923338 Leevansha A May 12, 2020, 8:54 p.m. OK GNU C++14 TESTS 40 30 3788800 900
79918125 Warrior07 A May 12, 2020, 7:27 p.m. OK GNU C++14 TESTS 40 30 3788800 900
79911919 aviabhinn98 A May 12, 2020, 6:06 p.m. OK GNU C++14 TESTS 40 30 3788800 900
79981335 Msk_4all A May 13, 2020, 12:56 p.m. OK GNU C++14 TESTS 40 30 3993600 900
79934447 I_am_K A May 13, 2020, 2:14 a.m. OK GNU C++14 TESTS 40 30 3993600 900
81687868 awna A May 28, 2020, 8:55 a.m. OK GNU C++14 TESTS 40 31 0 900
80796900 sankalpraibole25892 A May 20, 2020, 5:53 p.m. OK GNU C++17 TESTS 40 30 0 900
81403522 Extraordinary_ A May 25, 2020, 4:45 p.m. OK GNU C++17 TESTS 40 30 204800 900
80454721 Mohsin_Bantu_cf A May 17, 2020, 9:25 a.m. OK GNU C++17 TESTS 40 30 3686400 900
80063913 rohanblueboybaijal A May 14, 2020, 11:34 a.m. OK GNU C++17 TESTS 40 30 3686400 900
79953551 _MJiH_ A May 13, 2020, 7:26 a.m. OK GNU C++17 TESTS 40 30 3686400 900
79935400 vaibnak7 A May 13, 2020, 2:38 a.m. OK GNU C++17 TESTS 40 30 3788800 900
79901376 Devastating_Foe A May 12, 2020, 4:23 p.m. OK GNU C++17 TESTS 40 30 3993600 900
81691907 rahulraga A May 28, 2020, 9:46 a.m. OK GNU C++17 TESTS 40 31 0 900
81701067 Fireball0424 A May 28, 2020, 11:44 a.m. OK GNU C++17 TESTS 40 31 0 900
81707883 hihiai A May 28, 2020, 1:08 p.m. OK GNU C++17 TESTS 40 31 0 900
80073221 valorant A May 14, 2020, 1:23 p.m. OK GNU C++17 (64) TESTS 40 15 4300800 900
80158955 artem_just_artem_ A May 14, 2020, 5:06 p.m. OK GNU C++17 (64) TESTS 40 15 4300800 900
79932381 cmwqf A May 13, 2020, 1:21 a.m. OK GNU C++17 (64) TESTS 40 15 4505600 900
80744956 mahdi.hasnat A May 20, 2020, 6:08 a.m. OK GNU C++17 (64) TESTS 40 30 0 900
79951691 granddaifuku A May 13, 2020, 7:02 a.m. OK GNU C++17 (64) TESTS 40 30 4300800 900
79927333 j30 A May 12, 2020, 10:42 p.m. OK GNU C++17 (64) TESTS 40 30 4300800 900
79912711 KKT_89 A May 12, 2020, 6:16 p.m. OK GNU C++17 (64) TESTS 40 30 4300800 900
79966716 dbs_mnnit A May 13, 2020, 10:07 a.m. OK GNU C++17 (64) TESTS 40 30 4300800 900
79967946 Ajit. A May 13, 2020, 10:22 a.m. OK GNU C++17 (64) TESTS 40 30 4300800 900
80238157 StarKid18 A May 15, 2020, 3:08 p.m. OK GNU C++17 (64) TESTS 40 30 4300800 900
81458631 lamvh2812 A May 26, 2020, 10:08 a.m. OK Go TESTS 40 31 102400 900
80238031 glebsamsonov A May 15, 2020, 3:07 p.m. OK Go TESTS 40 46 13004800 900
79950117 Laurens A May 13, 2020, 6:44 a.m. OK Haskell TESTS 40 31 13824000 900
80437178 anuragshirolkar A May 17, 2020, 6:04 a.m. OK Haskell TESTS 40 31 13926400 900
80183059 MiltonEiji A May 15, 2020, 1:28 a.m. OK Haskell TESTS 40 62 13926400 900
81340553 p_unit A May 25, 2020, 2:05 a.m. OK Java 11 TESTS 40 171 0 900
81332247 llamanamedbob A May 24, 2020, 8:50 p.m. OK Java 11 TESTS 40 171 0 900
81171424 Corainbows A May 24, 2020, 11:37 a.m. OK Java 11 TESTS 40 171 0 900
80395828 shivendra.singh.3025 A May 16, 2020, 4:42 p.m. OK Java 11 TESTS 40 171 23859200 900
80290194 spiritbreaker_17 A May 16, 2020, 7:33 a.m. OK Java 11 TESTS 40 171 23859200 900
80273947 N220shri A May 16, 2020, 3:09 a.m. OK Java 11 TESTS 40 171 23859200 900
80273204 R3KT A May 16, 2020, 2:50 a.m. OK Java 11 TESTS 40 171 23859200 900
80242904 vivek21 A May 15, 2020, 4:03 p.m. OK Java 11 TESTS 40 171 23859200 900
80057389 rashmitpankhania A May 14, 2020, 10:16 a.m. OK Java 11 TESTS 40 171 23859200 900
80019396 amit_chas A May 13, 2020, 10:23 p.m. OK Java 11 TESTS 40 171 23859200 900
80069463 K.A.R.M.A A May 14, 2020, 12:37 p.m. OK Java 8 TESTS 40 108 20377600 900
79900195 Percy27 A May 12, 2020, 4:14 p.m. OK Java 8 TESTS 40 108 20377600 900
81665026 kevinyang A May 28, 2020, 2:54 a.m. OK Java 8 TESTS 40 109 0 900
81418398 partizan22 A May 25, 2020, 7:51 p.m. OK Java 8 TESTS 40 109 0 900
80971245 aswad2 A May 22, 2020, 9:32 p.m. OK Java 8 TESTS 40 109 0 900
80874666 SnowGoose A May 21, 2020, 5:10 p.m. OK Java 8 TESTS 40 109 0 900
80403445 DanielW48 A May 16, 2020, 6:04 p.m. OK Java 8 TESTS 40 109 20377600 900
80189504 pritam1102 A May 15, 2020, 4:11 a.m. OK Java 8 TESTS 40 109 20377600 900
80041922 BriGuy A May 14, 2020, 7:13 a.m. OK Java 8 TESTS 40 109 20377600 900
79992100 lizhijian A May 13, 2020, 2:51 p.m. OK Java 8 TESTS 40 109 20377600 900
80911939 atulgairola08 A May 22, 2020, 7:39 a.m. OK JavaScript TESTS 40 46 1024000 900
80755346 Manwithavan A May 20, 2020, 8:44 a.m. OK Kotlin TESTS 40 124 0 900
79905534 koboshi A May 12, 2020, 5 p.m. OK Kotlin TESTS 40 124 20480000 900
79908361 Tlatoani A May 12, 2020, 5:28 p.m. OK Kotlin TESTS 40 124 20889600 900
79895999 Spheniscine A May 12, 2020, 3:49 p.m. OK Kotlin TESTS 40 140 21094400 900
80932974 Tconan A May 22, 2020, 12:21 p.m. OK Kotlin TESTS 40 156 0 900
79922997 1Tim30n3 A May 12, 2020, 8:47 p.m. OK Mono C# TESTS 40 46 8601600 900
79896141 TRR A May 12, 2020, 3:50 p.m. OK Mono C# TESTS 40 61 8601600 900
81657707 _piyush A May 27, 2020, 10:16 p.m. OK Mono C# TESTS 40 62 0 900
80798926 krzysiek.slawik A May 20, 2020, 6:23 p.m. OK Mono C# TESTS 40 62 102400 900
80074471 nikitos111 A May 14, 2020, 1:38 p.m. OK Mono C# TESTS 40 62 8396800 900
79980155 anish.1922 A May 13, 2020, 12:42 p.m. OK Mono C# TESTS 40 62 8396800 900
80272910 ellip A May 16, 2020, 2:41 a.m. OK Mono C# TESTS 40 62 11980800 900
80285890 sakapon A May 16, 2020, 6:41 a.m. OK Mono C# TESTS 40 62 11980800 900
80285748 sakapon A May 16, 2020, 6:39 a.m. OK Mono C# TESTS 40 62 11980800 900
79918625 jdms A May 12, 2020, 7:35 p.m. OK Mono C# TESTS 40 62 12288000 900
80472892 gzl A May 17, 2020, 9:48 a.m. OK MS C++ TESTS 40 31 3891200 900
80230578 MrBear A May 15, 2020, 1:38 p.m. OK MS C++ TESTS 40 31 3891200 900
79890961 YTICpoch A May 12, 2020, 3 p.m. OK MS C++ TESTS 40 31 3891200 900
79933158 Alanaxixi A May 13, 2020, 1:42 a.m. OK MS C++ TESTS 40 31 4096000 900
81138852 vjudge1 A May 24, 2020, 7:06 a.m. OK MS C++ 2017 TESTS 40 31 0 900
81115076 jdb0ss A May 24, 2020, 6:56 a.m. OK MS C++ 2017 TESTS 40 31 0 900
81123973 sriganeshr2001 A May 24, 2020, 7:01 a.m. OK MS C++ 2017 TESTS 40 31 0 900
80294594 aakanksha.sehgal A May 16, 2020, 8:27 a.m. OK MS C++ 2017 TESTS 40 31 3686400 900
80615404 Bullbas A May 18, 2020, 3:12 p.m. OK MS C++ 2017 TESTS 40 31 3686400 900
80449555 ayuhero31 A May 17, 2020, 8:29 a.m. OK MS C++ 2017 TESTS 40 31 3686400 900
80309904 EmilSardaryan A May 16, 2020, 11:34 a.m. OK MS C++ 2017 TESTS 40 31 3686400 900
80230599 GeKa A May 15, 2020, 1:39 p.m. OK MS C++ 2017 TESTS 40 31 3686400 900
79971663 NikhRO A May 13, 2020, 11:05 a.m. OK MS C++ 2017 TESTS 40 31 3686400 900
79958555 brined_fish A May 13, 2020, 8:29 a.m. OK MS C++ 2017 TESTS 40 31 3686400 900
79985210 arpit2438735 A May 13, 2020, 1:42 p.m. OK Node.js TESTS 40 186 12492800 900
80290565 prosidom101 A May 16, 2020, 7:38 a.m. OK Node.js TESTS 40 202 12390400 900
80160057 Professor_Vishal_Parikh A May 14, 2020, 5:17 p.m. OK PHP TESTS 40 93 6041600 900
80164903 Keep_commenting A May 14, 2020, 6:13 p.m. OK PHP TESTS 40 93 6041600 900
80163231 Vishal_orz A May 14, 2020, 5:53 p.m. OK PHP TESTS 40 93 6041600 900
79922820 kit.shiron A May 12, 2020, 8:44 p.m. OK PyPy 2 TESTS 40 124 23142400 900
79926362 jooj A May 12, 2020, 10:13 p.m. OK PyPy 2 TESTS 40 124 23244800 900
79911961 beethoven97 A May 12, 2020, 6:07 p.m. OK PyPy 2 TESTS 40 124 23244800 900
79949978 MVP A May 13, 2020, 6:42 a.m. OK PyPy 2 TESTS 40 124 23347200 900
79911157 yumtam A May 12, 2020, 5:58 p.m. OK PyPy 2 TESTS 40 140 23142400 900
79904098 Devraj10 A May 12, 2020, 4:47 p.m. OK PyPy 2 TESTS 40 156 24371200 900
79902771 Ajay_Modi A May 12, 2020, 4:35 p.m. OK PyPy 3 TESTS 40 124 21401600 900
81458651 zasderjjrr A May 26, 2020, 10:08 a.m. OK PyPy 3 TESTS 40 140 0 900
81443676 maksimverlevskiy A May 26, 2020, 6:46 a.m. OK PyPy 3 TESTS 40 140 0 900
81401011 aniketsalunke84 A May 25, 2020, 4:11 p.m. OK PyPy 3 TESTS 40 140 0 900
80783144 mamin_gamer A May 20, 2020, 2:54 p.m. OK PyPy 3 TESTS 40 140 1126400 900
81380814 _kush_7 A May 25, 2020, 12:10 p.m. OK PyPy 3 TESTS 40 140 1228800 900
81368346 Janhavi_S A May 25, 2020, 9:40 a.m. OK PyPy 3 TESTS 40 140 1228800 900
80992635 bgnike A May 23, 2020, 7:17 a.m. OK PyPy 3 TESTS 40 140 1228800 900
80847736 Sampathkumar A May 21, 2020, 11:41 a.m. OK PyPy 3 TESTS 40 140 1228800 900
80783116 mamin_gamer A May 20, 2020, 2:54 p.m. OK PyPy 3 TESTS 40 140 1228800 900
79903175 ComptineDunAutreEte A May 12, 2020, 4:39 p.m. OK Python 2 TESTS 40 171 6451200 900
79898508 ap1008 A May 12, 2020, 4:03 p.m. OK Python 2 TESTS 40 186 6451200 900
80244642 mokshasood06 A May 15, 2020, 4:26 p.m. OK Python 2 TESTS 40 187 6451200 900
81691115 koushik_venkat A May 28, 2020, 9:36 a.m. OK Python 3 TESTS 40 108 307200 900
80932993 TorchRik A May 22, 2020, 12:21 p.m. OK Python 3 TESTS 40 108 307200 900
79955511 judgeme A May 13, 2020, 7:52 a.m. OK Python 3 TESTS 40 108 6656000 900
79900983 vinay272001 A May 12, 2020, 4:20 p.m. OK Python 3 TESTS 40 108 6656000 900
79900797 Black_Fregat A May 12, 2020, 4:18 p.m. OK Python 3 TESTS 40 108 6656000 900
79989074 mihir_07 A May 13, 2020, 2:23 p.m. OK Python 3 TESTS 40 108 6963200 900
79898894 raghavparsai A May 12, 2020, 4:05 p.m. OK Python 3 TESTS 40 108 6963200 900
81409278 Nishant_Rao A May 25, 2020, 5:54 p.m. OK Python 3 TESTS 40 109 0 900
81059353 devanshmishra111 A May 24, 2020, 4:16 a.m. OK Python 3 TESTS 40 109 0 900
80944531 Achintya01 A May 22, 2020, 2:53 p.m. OK Python 3 TESTS 40 109 0 900
80276479 utkarsh2102 A May 16, 2020, 4:11 a.m. OK Ruby TESTS 40 77 6451200 900
80048297 jkxing A May 14, 2020, 8:29 a.m. OK Rust TESTS 40 31 4096000 900
79980401 manta1130 A May 13, 2020, 12:45 p.m. OK Rust TESTS 40 46 3788800 900
80192250 DaveFol A May 15, 2020, 5:10 a.m. OK Rust TESTS 40 46 7782400 900
79921373 IvanDyachenko A May 12, 2020, 8:19 p.m. OK Scala TESTS 40 608 73420800 900

remove filters

Back to search problems