Educational Codeforces Round 59 (Rated for 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
1107 Educational Codeforces Round 59 (Rated for Div. 2) FINISHED False 7200 189008724 Jan. 26, 2019, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16265 ) B Digital root PROGRAMMING math number theory 1100

B"Today at the lesson of mathematics, Petya learns about the digital root. The digital root of a non-negative integer is the single digit value obtained by an iterative process of summing digits, on each iteration using the result from the previous iteration to compute a digit sum. The process continues until a single-digit number is reached. Let's denote the digital root of x as S(x) . Then S(5)=5 , S(38)=S(3+8=11)=S(1+1=2)=2 , S(10)=S(1+0=1)=1 . As a homework Petya got n tasks of the form: find k -th positive number whose digital root is x . Petya has already solved all the problems, but he doesn't know if it's right. Your task is to solve all n tasks from Petya's homework. The first line contains a single integer n ( 1 <= n <= 10^3 ) -- the number of tasks in Petya's homework. The next n lines contain two integers k_i ( 1 <= k_i <= 10^{12} ) and x_i ( 1 <= x_i <= 9 ) -- i -th Petya's task in which you need to find a k_i -th positive number, the digital root of which is x_i . Output n lines, i -th line should contain a single integer -- the answer to the i -th problem. "...

Tutorials

Educational Codeforces Round 59 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
57830140 vjudge3 B July 27, 2019, 5:44 a.m. OK Clang++17 Diagnostics TESTS 8 31 0 1100
51403600 Veyron404 B March 17, 2019, 8:43 a.m. OK Clang++17 Diagnostics TESTS 8 46 0 1100
51533262 kartik_ B March 19, 2019, 4:43 p.m. OK Clang++17 Diagnostics TESTS 8 46 0 1100
57830001 vjudge2 B July 27, 2019, 5:42 a.m. OK Clang++17 Diagnostics TESTS 8 46 0 1100
57830253 vjudge2 B July 27, 2019, 5:46 a.m. OK Clang++17 Diagnostics TESTS 8 46 0 1100
57830548 vjudge3 B July 27, 2019, 5:52 a.m. OK Clang++17 Diagnostics TESTS 8 46 0 1100
57830568 vjudge3 B July 27, 2019, 5:52 a.m. OK Clang++17 Diagnostics TESTS 8 46 0 1100
57830644 vjudge2 B July 27, 2019, 5:53 a.m. OK Clang++17 Diagnostics TESTS 8 46 0 1100
57832096 vjudge1 B July 27, 2019, 6:23 a.m. OK Clang++17 Diagnostics TESTS 8 46 0 1100
49474622 smit.mangukiya B Feb. 4, 2019, 6:45 p.m. OK Clang++17 Diagnostics TESTS 8 46 0 1100
49201629 pojinatel B Jan. 30, 2019, 12:37 p.m. OK Delphi TESTS 8 31 102400 1100
49008863 Mike4235 B Jan. 26, 2019, 4:23 p.m. OK FPC TESTS 8 15 0 1100
51957791 pqhieu B March 29, 2019, 4:19 a.m. OK FPC TESTS 8 31 0 1100
49006230 Bear.-. B Jan. 26, 2019, 4:11 p.m. OK FPC TESTS 8 31 0 1100
49009874 Mad_Andrei1 B Jan. 26, 2019, 4:28 p.m. OK GNU C11 TESTS 8 15 0 1100
49014457 2018330300167 B Jan. 26, 2019, 4:55 p.m. OK GNU C11 TESTS 8 15 0 1100
49015059 RmnFs B Jan. 26, 2019, 4:58 p.m. OK GNU C11 TESTS 8 15 0 1100
49213311 balasiva B Jan. 30, 2019, 4:19 p.m. OK GNU C11 TESTS 8 15 0 1100
49344728 MS1908 B Feb. 2, 2019, 4:34 a.m. OK GNU C11 TESTS 8 15 0 1100
49506561 triggered_Man B Feb. 5, 2019, 5:47 p.m. OK GNU C11 TESTS 8 15 0 1100
53120016 __UR B April 22, 2019, 10:46 a.m. OK GNU C11 TESTS 8 15 0 1100
53369113 Jahid135 B April 26, 2019, 5:13 p.m. OK GNU C11 TESTS 8 15 0 1100
53947940 IncubatorMan B May 10, 2019, 7:52 a.m. OK GNU C11 TESTS 8 15 0 1100
56974735 Xetnys_Rorre B July 13, 2019, 11:47 a.m. OK GNU C11 TESTS 8 15 0 1100
60827495 inluminas B Sept. 19, 2019, 5:03 a.m. OK GNU C++11 TESTS 8 15 0 1100
61319353 vjudge4 B Sept. 26, 2019, 12:05 p.m. OK GNU C++11 TESTS 8 15 0 1100
62319170 vjudge4 B Oct. 10, 2019, 4:11 p.m. OK GNU C++11 TESTS 8 15 0 1100
62362869 Tareq_Ali B Oct. 11, 2019, 1 p.m. OK GNU C++11 TESTS 8 15 0 1100
63652113 The_Daler B Oct. 28, 2019, 11:42 a.m. OK GNU C++11 TESTS 8 15 0 1100
64597496 Gabrielbc7 B Nov. 9, 2019, 5:20 p.m. OK GNU C++11 TESTS 8 15 0 1100
64598951 vjudge1 B Nov. 9, 2019, 5:52 p.m. OK GNU C++11 TESTS 8 15 0 1100
65933986 Dayllon B Nov. 28, 2019, 11:46 p.m. OK GNU C++11 TESTS 8 15 0 1100
67146259 wasa855 B Dec. 18, 2019, 8:58 a.m. OK GNU C++11 TESTS 8 15 0 1100
67610225 M_Erfan_S B Dec. 25, 2019, 3:06 p.m. OK GNU C++11 TESTS 8 15 0 1100
67155481 feyre_1611 B Dec. 18, 2019, 12:21 p.m. OK GNU C++14 TESTS 8 15 0 1100
69290207 Ahmed_Abid B Jan. 22, 2020, 9:56 a.m. OK GNU C++14 TESTS 8 15 0 1100
68717003 derrickball B Jan. 13, 2020, 2:50 p.m. OK GNU C++14 TESTS 8 15 0 1100
68565802 vjudge3 B Jan. 10, 2020, 9:08 p.m. OK GNU C++14 TESTS 8 15 0 1100
68011947 Nkap B Dec. 31, 2019, 4:17 p.m. OK GNU C++14 TESTS 8 15 0 1100
67980655 daiviksakaria B Dec. 30, 2019, 7:04 p.m. OK GNU C++14 TESTS 8 15 0 1100
67451598 sexy_biatch B Dec. 23, 2019, 4:37 a.m. OK GNU C++14 TESTS 8 15 0 1100
66296762 vjudge2 B Dec. 5, 2019, 4:53 a.m. OK GNU C++14 TESTS 8 15 0 1100
66170115 letsdo B Dec. 2, 2019, 9:53 a.m. OK GNU C++14 TESTS 8 15 0 1100
65690844 techaddict B Nov. 25, 2019, 4:44 a.m. OK GNU C++14 TESTS 8 15 0 1100
68123439 Coder_95 B Jan. 3, 2020, 2:13 p.m. OK GNU C++17 TESTS 8 15 0 1100
68393777 Bilas_LU B Jan. 8, 2020, 9:58 a.m. OK GNU C++17 TESTS 8 15 0 1100
68407396 n000 B Jan. 8, 2020, 3:31 p.m. OK GNU C++17 TESTS 8 15 0 1100
68462894 fake_name B Jan. 9, 2020, 6:50 p.m. OK GNU C++17 TESTS 8 15 0 1100
68481474 olphe B Jan. 10, 2020, 7:56 a.m. OK GNU C++17 TESTS 8 15 0 1100
68482576 9957 B Jan. 10, 2020, 8:23 a.m. OK GNU C++17 TESTS 8 15 0 1100
69584540 vjudge5 B Jan. 26, 2020, 6:51 p.m. OK GNU C++17 TESTS 8 15 0 1100
69637789 codeforces_judge B Jan. 27, 2020, 7:23 p.m. OK GNU C++17 TESTS 8 15 0 1100
69691279 vjudge4 B Jan. 28, 2020, 6:41 p.m. OK GNU C++17 TESTS 8 15 0 1100
69949953 Goku99 B Feb. 1, 2020, 8:39 a.m. OK GNU C++17 TESTS 8 15 0 1100
49483571 hqhs B Feb. 5, 2019, 2:37 a.m. OK Go TESTS 8 46 0 1100
49040050 nethish B Jan. 27, 2019, 6:05 a.m. OK Go TESTS 8 62 0 1100
52880805 jedikni B April 16, 2019, 11:51 p.m. OK Haskell TESTS 8 15 102400 1100
49175146 hetzi B Jan. 29, 2019, 8:02 p.m. OK Haskell TESTS 8 31 8396800 1100
52924317 CharlesDai B April 17, 2019, 7:33 p.m. OK Java 8 TESTS 8 93 0 1100
49036151 aman28rwt B Jan. 27, 2019, 3:26 a.m. OK Java 8 TESTS 8 93 0 1100
49012919 coderbond007 B Jan. 26, 2019, 4:45 p.m. OK Java 8 TESTS 8 93 0 1100
52302976 joney_000 B April 4, 2019, 10:26 a.m. OK Java 8 TESTS 8 108 0 1100
49927932 gcarrillo2 B Feb. 15, 2019, 1:24 a.m. OK Java 8 TESTS 8 108 0 1100
49204458 zhishou B Jan. 30, 2019, 1:29 p.m. OK Java 8 TESTS 8 108 0 1100
49054670 ay839065 B Jan. 27, 2019, 12:46 p.m. OK Java 8 TESTS 8 108 0 1100
49047874 Pratik_Rajani B Jan. 27, 2019, 9:41 a.m. OK Java 8 TESTS 8 108 0 1100
49023570 Mackenzie B Jan. 26, 2019, 6:08 p.m. OK Java 8 TESTS 8 108 0 1100
49019369 Ahmed..Adel..Selim B Jan. 26, 2019, 5:24 p.m. OK Java 8 TESTS 8 108 0 1100
50069801 Cipri321 B Feb. 17, 2019, 5 p.m. OK JavaScript TESTS 8 31 1228800 1100
49024050 orazbek B Jan. 26, 2019, 6:15 p.m. OK JavaScript TESTS 8 31 1228800 1100
50275288 I.A.K.O.V B Feb. 21, 2019, 9:38 a.m. OK Kotlin TESTS 8 124 0 1100
50274100 I.A.K.O.V B Feb. 21, 2019, 9:01 a.m. OK Kotlin TESTS 8 140 0 1100
54068589 Farwent B May 13, 2019, 2:48 p.m. OK Kotlin TESTS 8 155 0 1100
49953523 kokokochet B Feb. 15, 2019, 3 p.m. OK Kotlin TESTS 8 155 0 1100
49009516 spookywooky B Jan. 26, 2019, 4:26 p.m. OK Kotlin TESTS 8 171 0 1100
49981388 glider.g B Feb. 16, 2019, 8:25 a.m. OK Kotlin TESTS 8 171 204800 1100
50493209 nemars B Feb. 25, 2019, 2:07 p.m. OK Mono C# TESTS 8 46 102400 1100
49678544 fastnoise B Feb. 9, 2019, 9:50 p.m. OK Mono C# TESTS 8 46 102400 1100
49319154 selpo B Feb. 1, 2019, 11:31 a.m. OK Mono C# TESTS 8 46 3891200 1100
49029104 _SHREDDER_ B Jan. 26, 2019, 8:45 p.m. OK Mono C# TESTS 8 46 3891200 1100
49056146 TRR B Jan. 27, 2019, 1:23 p.m. OK Mono C# TESTS 8 61 204800 1100
49991711 IleksaNott B Feb. 16, 2019, 1:07 p.m. OK Mono C# TESTS 8 62 204800 1100
53117561 treasuryonly B April 22, 2019, 9:09 a.m. OK Mono C# TESTS 8 62 307200 1100
49007732 Otkloneniye B Jan. 26, 2019, 4:18 p.m. OK Mono C# TESTS 8 62 716800 1100
49072889 lionvs13 B Jan. 27, 2019, 10:46 p.m. OK Mono C# TESTS 8 62 3891200 1100
49101154 ykurmangaliyev B Jan. 28, 2019, 11:24 a.m. OK Mono C# TESTS 8 62 3891200 1100
51956432 vjudge1 B March 29, 2019, 2:49 a.m. OK MS C++ TESTS 8 15 0 1100
51421673 wjfwjfwjf B March 17, 2019, 4:52 p.m. OK MS C++ TESTS 8 15 0 1100
50598023 vjudge5 B Feb. 28, 2019, 11:23 a.m. OK MS C++ TESTS 8 15 0 1100
50393991 vjudge5 B Feb. 23, 2019, 3:04 p.m. OK MS C++ TESTS 8 15 0 1100
49384497 vjudge1 B Feb. 3, 2019, 5:46 a.m. OK MS C++ TESTS 8 15 0 1100
49383709 vjudge3 B Feb. 3, 2019, 5:03 a.m. OK MS C++ TESTS 8 15 0 1100
56144057 vjudge2 B June 27, 2019, 5:11 a.m. OK MS C++ TESTS 8 15 0 1100
56144422 vjudge4 B June 27, 2019, 5:26 a.m. OK MS C++ TESTS 8 15 0 1100
56144423 vjudge2 B June 27, 2019, 5:26 a.m. OK MS C++ TESTS 8 15 0 1100
52082044 1per1per B March 31, 2019, 12:36 p.m. OK MS C++ TESTS 8 15 0 1100
49037921 zzysleep B Jan. 27, 2019, 4:55 a.m. OK MS C++ 2017 TESTS 8 15 0 1100
51144221 abdulrhman-alshahin B March 10, 2019, 9:52 p.m. OK MS C++ 2017 TESTS 8 15 0 1100
58944589 vjudge4 B Aug. 17, 2019, 8:23 a.m. OK MS C++ 2017 TESTS 8 15 0 1100
58944645 vjudge3 B Aug. 17, 2019, 8:25 a.m. OK MS C++ 2017 TESTS 8 15 0 1100
49005984 onipp B Jan. 26, 2019, 4:10 p.m. OK MS C++ 2017 TESTS 8 15 0 1100
49122854 elvinaa B Jan. 28, 2019, 8:17 p.m. OK MS C++ 2017 TESTS 8 15 0 1100
49336235 Husne_Matar B Feb. 1, 2019, 6:38 p.m. OK MS C++ 2017 TESTS 8 15 0 1100
49360176 The-Last-Avenger B Feb. 2, 2019, 12:30 p.m. OK MS C++ 2017 TESTS 8 15 0 1100
49522231 DoesNotExist B Feb. 6, 2019, 8:52 a.m. OK MS C++ 2017 TESTS 8 30 0 1100
51312339 dslom B March 14, 2019, 8:17 p.m. OK MS C++ 2017 TESTS 8 30 0 1100
60895575 magic_beans B Sept. 19, 2019, 6:36 p.m. OK Node.js TESTS 8 171 1536000 1100
49036481 sk0 B Jan. 27, 2019, 3:41 a.m. OK Ocaml TESTS 8 15 0 1100
49024660 sk0 B Jan. 26, 2019, 6:28 p.m. OK Ocaml TESTS 8 15 0 1100
49662172 ivan225321 B Feb. 9, 2019, 12:55 p.m. OK PascalABC.NET TESTS 8 311 0 1100
54284324 Houy3 B May 17, 2019, 3:06 p.m. OK PascalABC.NET TESTS 8 311 204800 1100
56444396 Gimber B July 2, 2019, 6:06 p.m. OK PascalABC.NET TESTS 8 327 102400 1100
49102140 terpingidrat B Jan. 28, 2019, 11:45 a.m. OK PHP TESTS 8 46 0 1100
49024256 mayakin B Jan. 26, 2019, 6:20 p.m. OK PHP TESTS 8 46 512000 1100
49030766 kabeer27 B Jan. 26, 2019, 10 p.m. OK PyPy 2 TESTS 8 140 204800 1100
55336264 kaif_7 B June 9, 2019, 1:57 p.m. OK PyPy 2 TESTS 8 155 614400 1100
49012746 codeseeker B Jan. 26, 2019, 4:44 p.m. OK PyPy 2 TESTS 8 170 819200 1100
49009947 alessandrosolbiati B Jan. 26, 2019, 4:29 p.m. OK PyPy 2 TESTS 8 171 614400 1100
50210500 ryanr1230 B Feb. 19, 2019, 10:50 p.m. OK PyPy 2 TESTS 8 186 614400 1100
49131196 dtl8 B Jan. 29, 2019, 4:19 a.m. OK PyPy 2 TESTS 8 202 614400 1100
53770284 cherry_su B May 5, 2019, 4:35 a.m. OK PyPy 2 TESTS 8 202 1843200 1100
58167560 ssk497 B Aug. 2, 2019, 9:43 a.m. OK PyPy 2 TESTS 8 234 8908800 1100
49067621 masonsbro B Jan. 27, 2019, 6:36 p.m. OK PyPy 2 TESTS 8 312 614400 1100
49523661 c1729 B Feb. 6, 2019, 9:53 a.m. OK PyPy 3 TESTS 8 124 204800 1100
49041832 Mr.Inconsistent B Jan. 27, 2019, 6:49 a.m. OK PyPy 3 TESTS 8 155 614400 1100
60823300 idjuana B Sept. 19, 2019, 2:05 a.m. OK PyPy 3 TESTS 8 155 1433600 1100
49204849 SHOVON588 B Jan. 30, 2019, 1:36 p.m. OK PyPy 3 TESTS 8 170 1024000 1100
54778978 knight-erraunt B May 28, 2019, 7:54 p.m. OK PyPy 3 TESTS 8 171 921600 1100
49881151 sybergeek B Feb. 13, 2019, 6:13 p.m. OK PyPy 3 TESTS 8 171 921600 1100
49397714 E-Maks B Feb. 3, 2019, 1:11 p.m. OK PyPy 3 TESTS 8 171 921600 1100
49096769 RasMalai B Jan. 28, 2019, 10:06 a.m. OK PyPy 3 TESTS 8 171 921600 1100
49074786 X_X412 B Jan. 28, 2019, 1:42 a.m. OK PyPy 3 TESTS 8 171 921600 1100
49037504 tbzard B Jan. 27, 2019, 4:35 a.m. OK PyPy 3 TESTS 8 171 921600 1100
52303678 AmRev B April 4, 2019, 10:54 a.m. OK Python 2 TESTS 8 155 0 1100
49912053 nealzane B Feb. 14, 2019, 2:39 p.m. OK Python 2 TESTS 8 155 0 1100
49063164 mohit_11615192 B Jan. 27, 2019, 4:24 p.m. OK Python 2 TESTS 8 155 0 1100
50093729 Luxo B Feb. 18, 2019, 11:45 a.m. OK Python 2 TESTS 8 156 0 1100
49141207 RawFisher B Jan. 29, 2019, 10:20 a.m. OK Python 2 TESTS 8 156 0 1100
57803263 phoenix28 B July 26, 2019, 2:08 p.m. OK Python 2 TESTS 8 170 0 1100
54783986 franckmy B May 29, 2019, 2 a.m. OK Python 2 TESTS 8 170 0 1100
49153067 smunjal96 B Jan. 29, 2019, 12:52 p.m. OK Python 2 TESTS 8 170 0 1100
49742363 rishtrip B Feb. 10, 2019, 7:38 p.m. OK Python 2 TESTS 8 171 0 1100
49296134 figdan B Jan. 31, 2019, 10:57 p.m. OK Python 2 TESTS 8 171 0 1100
49690524 avi13715 B Feb. 10, 2019, 10:57 a.m. OK Python 3 TESTS 8 93 0 1100
49314165 Andru1 B Feb. 1, 2019, 9:32 a.m. OK Python 3 TESTS 8 93 0 1100
49020878 demqa B Jan. 26, 2019, 5:31 p.m. OK Python 3 TESTS 8 93 0 1100
49015631 vidhan.jhawar98 B Jan. 26, 2019, 5:02 p.m. OK Python 3 TESTS 8 93 0 1100
49023987 bkalra92 B Jan. 26, 2019, 6:14 p.m. OK Python 3 TESTS 8 93 307200 1100
49485162 JaneCare B Feb. 5, 2019, 4:54 a.m. OK Python 3 TESTS 8 93 409600 1100
66445152 wired B Dec. 7, 2019, 9:22 a.m. OK Python 3 TESTS 8 108 0 1100
60329278 blackandwhite B Sept. 10, 2019, 4:40 a.m. OK Python 3 TESTS 8 108 0 1100
59666360 prsb123 B Aug. 29, 2019, 2:19 p.m. OK Python 3 TESTS 8 108 0 1100
58869192 MzMahmud B Aug. 15, 2019, 2:37 p.m. OK Python 3 TESTS 8 108 0 1100
49392808 kobae964 B Feb. 3, 2019, 10:55 a.m. OK Ruby TESTS 8 46 0 1100
49018678 majali B Jan. 26, 2019, 5:20 p.m. OK Ruby TESTS 8 62 0 1100
49034500 cielavenir B Jan. 27, 2019, 2:04 a.m. OK Ruby TESTS 8 77 0 1100
52880792 jedikni B April 16, 2019, 11:51 p.m. OK Ruby TESTS 8 108 102400 1100
49008355 yakamoto B Jan. 26, 2019, 4:21 p.m. OK Scala TESTS 8 390 0 1100
49294491 mishgan B Jan. 31, 2019, 9:23 p.m. OK Scala TESTS 8 421 0 1100

remove filters

Back to search problems