Codeforces Round 818 (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
1717 Codeforces Round 818 (Div. 2) FINISHED False 7200 75050663 Sept. 2, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2828 ) E Madoka and The Best University PROGRAMMING brute force math number theory 2200

B'Madoka wants to enter to "Novosibirsk State University", but in the entrance exam she came across a very difficult task: Given an integer n , it is required to calculate sum{ operatorname{lcm}(c, gcd(a, b))} , for all triples of positive integers (a, b, c) , where a + b + c = n . In this problem gcd(x, y) denotes the greatest common divisor of x and y , and operatorname{lcm}(x, y) denotes the least common multiple of x and y . Solve this problem for Madoka and help her to enter to the best university! The first and the only line contains a single integer n ( 3 <= n <= 10^5 ). Print exactly one interger -- sum{ operatorname{lcm}(c, gcd(a, b))} . Since the answer can be very large, then output it modulo 10^9 + 7 . In the first example, there is only one suitable triple (1, 1, 1) . So the answer is operatorname{lcm}(1, gcd(1, 1)) = operatorname{lcm}(1, 1) = 1 . In the second example, operatorname{lcm}(1, gcd(3, 1)) + operatorname{lcm}(1, gcd(2, 2)) + operatorname{lcm}(1, gcd(1, 3)) + operatorname{lcm}(2, gcd(2, 1)) + operatorname{lcm}(2, gcd(1, 2)) + operatorname{lcm}(3, gcd(1, 1)) = operatorname{lcm}(1, 1) + operatorname{lcm}(1, 2) + operatorname{lcm}(1, 1) + operatorname{lcm}(2, 1) + operatorname{lcm}(2, 1) + operatorname{lcm}(3, 1) = 1 + 2 + 1 + 2 + 2 + 3 = 11 '...

Tutorials

Codeforces Round #818 (Div. 2) Editorial.

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
170642525 chro4896 E Sept. 2, 2022, 4:24 p.m. OK GNU C11 TESTS 17 15 409600 2200
170639497 GrigoriySol1902 E Sept. 2, 2022, 4:16 p.m. OK GNU C++14 TESTS 17 15 1228800 2200
170663271 Deaga E Sept. 2, 2022, 7:07 p.m. OK GNU C++14 TESTS 17 31 819200 2200
170644603 aymanriadsolh E Sept. 2, 2022, 4:29 p.m. OK GNU C++14 TESTS 17 31 1945600 2200
170695430 dengsh E Sept. 3, 2022, 5:35 a.m. OK GNU C++14 TESTS 17 31 2048000 2200
170688602 CK2021 E Sept. 3, 2022, 3:52 a.m. OK GNU C++14 TESTS 17 31 5836800 2200
170642050 WDCnew E Sept. 2, 2022, 4:23 p.m. OK GNU C++14 TESTS 17 46 512000 2200
170683458 Newusers E Sept. 3, 2022, 2:17 a.m. OK GNU C++14 TESTS 17 46 921600 2200
170697516 fryezsh E Sept. 3, 2022, 6:02 a.m. OK GNU C++14 TESTS 17 46 921600 2200
170641970 Icedpiggy E Sept. 2, 2022, 4:22 p.m. OK GNU C++14 TESTS 17 46 1945600 2200
170687411 dcmfqw E Sept. 3, 2022, 3:28 a.m. OK GNU C++14 TESTS 17 46 2867200 2200
170676175 Plums E Sept. 2, 2022, 11:06 p.m. OK GNU C++17 TESTS 17 31 1638400 2200
170682117 dumb_boi E Sept. 3, 2022, 1:47 a.m. OK GNU C++17 TESTS 17 31 2355200 2200
170654662 184815740 E Sept. 2, 2022, 5:32 p.m. OK GNU C++17 TESTS 17 31 2457600 2200
170642108 wfe2017 E Sept. 2, 2022, 4:23 p.m. OK GNU C++17 TESTS 17 31 3379200 2200
170690465 zhangshaojia E Sept. 3, 2022, 4:26 a.m. OK GNU C++17 TESTS 17 31 6553600 2200
170646303 mijan E Sept. 2, 2022, 4:33 p.m. OK GNU C++17 TESTS 17 31 20070400 2200
170665443 kbp12 E Sept. 2, 2022, 7:34 p.m. OK GNU C++17 TESTS 17 46 409600 2200
170639912 TrivialMan E Sept. 2, 2022, 4:17 p.m. OK GNU C++17 TESTS 17 46 819200 2200
170697271 SmartNanfeng E Sept. 3, 2022, 5:59 a.m. OK GNU C++17 TESTS 17 61 409600 2200
170658261 _RAGE E Sept. 2, 2022, 6:08 p.m. OK GNU C++17 TESTS 17 61 4300800 2200
170641931 lee0560 E Sept. 2, 2022, 4:22 p.m. OK GNU C++17 (64) TESTS 17 15 2457600 2200
170643068 antguz E Sept. 2, 2022, 4:25 p.m. OK GNU C++17 (64) TESTS 17 30 614400 2200
170685359 Yahbim E Sept. 3, 2022, 2:53 a.m. OK GNU C++17 (64) TESTS 17 31 512000 2200
170693945 wqy2022 E Sept. 3, 2022, 5:16 a.m. OK GNU C++17 (64) TESTS 17 31 1228800 2200
170657122 cuzperf E Sept. 2, 2022, 5:56 p.m. OK GNU C++17 (64) TESTS 17 31 1638400 2200
170658454 bashkort E Sept. 2, 2022, 6:10 p.m. OK GNU C++17 (64) TESTS 17 46 409600 2200
170690854 DarknessCatcher_fan E Sept. 3, 2022, 4:32 a.m. OK GNU C++17 (64) TESTS 17 46 1228800 2200
170650431 alocytus E Sept. 2, 2022, 4:58 p.m. OK GNU C++17 (64) TESTS 17 46 6041600 2200
170689324 xxafhixx E Sept. 3, 2022, 4:06 a.m. OK GNU C++17 (64) TESTS 17 62 614400 2200
170649878 MarcosK E Sept. 2, 2022, 4:55 p.m. OK GNU C++17 (64) TESTS 17 62 819200 2200
170643595 QuadnucYard E Sept. 2, 2022, 4:27 p.m. OK GNU C++20 (64) TESTS 17 15 5632000 2200
170670999 akshaykhandelwal E Sept. 2, 2022, 9:06 p.m. OK GNU C++20 (64) TESTS 17 30 3174400 2200
170663045 HaccerKat E Sept. 2, 2022, 7:04 p.m. OK GNU C++20 (64) TESTS 17 31 409600 2200
170676774 Mryange E Sept. 2, 2022, 11:25 p.m. OK GNU C++20 (64) TESTS 17 31 409600 2200
170644459 CN_DreamerP E Sept. 2, 2022, 4:29 p.m. OK GNU C++20 (64) TESTS 17 31 819200 2200
170640346 dianhsu_shield E Sept. 2, 2022, 4:18 p.m. OK GNU C++20 (64) TESTS 17 31 921600 2200
170688521 jason-wang E Sept. 3, 2022, 3:51 a.m. OK GNU C++20 (64) TESTS 17 31 921600 2200
170685225 naivewang E Sept. 3, 2022, 2:51 a.m. OK GNU C++20 (64) TESTS 17 31 1024000 2200
170655463 machine_solution E Sept. 2, 2022, 5:40 p.m. OK GNU C++20 (64) TESTS 17 31 2150400 2200
170688815 yiyiCat E Sept. 3, 2022, 3:57 a.m. OK GNU C++20 (64) TESTS 17 31 2457600 2200
170688231 shojin_pro E Sept. 3, 2022, 3:45 a.m. OK Java 11 TESTS 17 935 5734400 2200
170688483 shojin_pro E Sept. 3, 2022, 3:50 a.m. OK Java 11 TESTS 17 982 35942400 2200
170679063 Mamimi E Sept. 3, 2022, 12:26 a.m. OK Java 17 TESTS 17 436 614400 2200
170683579 Mamimi E Sept. 3, 2022, 2:19 a.m. OK Java 17 TESTS 17 436 614400 2200
170657229 freehandle E Sept. 2, 2022, 5:57 p.m. OK Java 17 TESTS 17 467 6656000 2200
170657286 freehandle E Sept. 2, 2022, 5:58 p.m. OK Java 17 TESTS 17 514 6553600 2200
170645703 The_terminator E Sept. 2, 2022, 4:32 p.m. OK Java 8 TESTS 17 499 0 2200
170691139 megaspazz E Sept. 3, 2022, 4:37 a.m. OK Java 8 TESTS 17 592 29286400 2200
170692813 megaspazz E Sept. 3, 2022, 5:02 a.m. OK Java 8 TESTS 17 607 29388800 2200
170659567 r57shell E Sept. 2, 2022, 6:22 p.m. OK MS C++ 2017 TESTS 17 280 10240000 2200
170645145 omniglot E Sept. 2, 2022, 4:31 p.m. OK Perl TESTS 17 779 8704000 2200
170648459 1_2_3_4_5_9 E Sept. 2, 2022, 4:48 p.m. OK PyPy 2 TESTS 17 998 37785600 2200
170649171 fathorse E Sept. 2, 2022, 4:51 p.m. OK PyPy 3 TESTS 17 358 18944000 2200
170645096 8wings E Sept. 2, 2022, 4:30 p.m. OK PyPy 3 TESTS 17 826 5632000 2200
170642894 yawn_sean_fan E Sept. 2, 2022, 4:25 p.m. OK PyPy 3-64 TESTS 17 249 17920000 2200
170655562 sushmanth.dampur8780 E Sept. 2, 2022, 5:41 p.m. OK PyPy 3-64 TESTS 17 390 11980800 2200
170643822 huangxw E Sept. 2, 2022, 4:27 p.m. OK PyPy 3-64 TESTS 17 561 46592000 2200
170650505 shobonvip E Sept. 2, 2022, 4:59 p.m. OK PyPy 3-64 TESTS 17 717 3276800 2200
170658102 roaris E Sept. 2, 2022, 6:06 p.m. OK PyPy 3-64 TESTS 17 763 4812800 2200
170681728 Spheniscine E Sept. 3, 2022, 1:38 a.m. OK Rust 2021 TESTS 17 109 307200 2200
170645338 apilat E Sept. 2, 2022, 4:31 p.m. OK Rust 2021 TESTS 17 171 1945600 2200
170646316 LittleFall E Sept. 2, 2022, 4:33 p.m. OK Rust 2021 TESTS 17 249 0 2200

remove filters

Back to search problems