Codeforces Round 628 (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
1325 Codeforces Round 628 (Div. 2) FINISHED False 7200 147626699 March 14, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 40500 ) A EhAb AnD gCd PROGRAMMING constructive algorithms greedy number theory 800

B"You are given a positive integer x . Find any such 2 positive integers a and b such that GCD(a,b)+LCM(a,b)=x . As a reminder, GCD(a,b) is the greatest integer that divides both a and b . Similarly, LCM(a,b) is the smallest integer such that both a and b divide it. It's guaranteed that the solution always exists. If there are several such pairs (a, b) , you can output any of them. The first line contains a single integer t (1 <= t <= 100) -- the number of testcases. Each testcase consists of one line containing a single integer, x (2 <= x <= 10^9) . For each testcase, output a pair of positive integers a and b ( 1 <= a, b <= 10^9) such that GCD(a,b)+LCM(a,b)=x . It's guaranteed that the solution always exists. If there are several such pairs (a, b) , you can output any of them. In the first testcase of the sample, GCD(1,1)+LCM(1,1)=1+1=2 . In the second testcase of the sample, GCD(6,4)+LCM(6,4)=2+12=14 . "...

Tutorials

74235

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
73314781 sspu_zcy A March 15, 2020, 8:05 a.m. OK Clang++17 Diagnostics TESTS 13 46 0 800
73285154 askswaraj A March 14, 2020, 7:59 p.m. OK Clang++17 Diagnostics TESTS 13 46 0 800
73615012 Hidden_Practice A March 19, 2020, 12:19 a.m. OK Delphi TESTS 13 31 102400 800
73447492 vjudge1 A March 17, 2020, 1:11 a.m. OK FPC TESTS 13 30 0 800
73303340 AKWarriors A March 15, 2020, 5:08 a.m. OK FPC TESTS 13 30 0 800
73633284 platonabramov A March 19, 2020, 7:50 a.m. OK FPC TESTS 13 31 0 800
73296496 luogu_bot1 A March 15, 2020, 1:49 a.m. OK FPC TESTS 13 31 204800 800
73425541 hazard8474 A March 16, 2020, 4:51 p.m. OK GNU C11 TESTS 13 15 0 800
73412742 R1F4 A March 16, 2020, 1:49 p.m. OK GNU C11 TESTS 13 15 0 800
73343517 aryarn A March 15, 2020, 2:36 p.m. OK GNU C11 TESTS 13 15 0 800
73802305 fiery_nebula A March 20, 2020, 2:35 p.m. OK GNU C11 TESTS 13 15 0 800
73789706 Kauser A March 20, 2020, 12:06 p.m. OK GNU C11 TESTS 13 15 0 800
73644765 Ph0enX A March 19, 2020, 10:41 a.m. OK GNU C11 TESTS 13 15 0 800
73595755 Sajjad_fc13 A March 18, 2020, 5:41 p.m. OK GNU C11 TESTS 13 15 0 800
73562460 polarbear26 A March 18, 2020, 11:04 a.m. OK GNU C11 TESTS 13 15 0 800
73485297 lifers A March 17, 2020, 12:42 p.m. OK GNU C11 TESTS 13 15 0 800
73462611 s_r_rayhan A March 17, 2020, 7:39 a.m. OK GNU C11 TESTS 13 15 0 800
73651810 Ani01 A March 19, 2020, 12:24 p.m. OK GNU C++11 TESTS 13 15 0 800
73512548 vjudge1 A March 17, 2020, 5:53 p.m. OK GNU C++11 TESTS 13 15 0 800
73533593 BeyondHeaven A March 18, 2020, 2:21 a.m. OK GNU C++11 TESTS 13 15 0 800
73612741 mohamedgab97 A March 18, 2020, 10:54 p.m. OK GNU C++11 TESTS 13 15 0 800
73618127 Zi_yu A March 19, 2020, 2:23 a.m. OK GNU C++11 TESTS 13 15 0 800
73622315 xwn A March 19, 2020, 4:41 a.m. OK GNU C++11 TESTS 13 15 0 800
73625664 alrz A March 19, 2020, 5:55 a.m. OK GNU C++11 TESTS 13 15 0 800
73784831 bombanup A March 20, 2020, 11:01 a.m. OK GNU C++11 TESTS 13 15 0 800
73761367 mustafizurahmed A March 20, 2020, 5:22 a.m. OK GNU C++11 TESTS 13 15 0 800
73652228 wsad112233 A March 19, 2020, 12:30 p.m. OK GNU C++11 TESTS 13 15 0 800
73828993 layal.hasn11 A March 20, 2020, 7:40 p.m. OK GNU C++14 TESTS 13 15 0 800
73818151 harsh_27 A March 20, 2020, 5:48 p.m. OK GNU C++14 TESTS 13 15 0 800
73813855 PraveenDhinwa A March 20, 2020, 5:08 p.m. OK GNU C++14 TESTS 13 15 0 800
73804430 DSR_TFB A March 20, 2020, 3:02 p.m. OK GNU C++14 TESTS 13 15 0 800
73803599 samiksha.jain.cer17 A March 20, 2020, 2:52 p.m. OK GNU C++14 TESTS 13 15 0 800
73802330 Aditya_278 A March 20, 2020, 2:36 p.m. OK GNU C++14 TESTS 13 15 0 800
73790043 mittal_sahab A March 20, 2020, 12:09 p.m. OK GNU C++14 TESTS 13 15 0 800
73786418 illiaf A March 20, 2020, 11:23 a.m. OK GNU C++14 TESTS 13 15 0 800
73780410 sawan07 A March 20, 2020, 9:55 a.m. OK GNU C++14 TESTS 13 15 0 800
73771684 kyu_Ki A March 20, 2020, 7:50 a.m. OK GNU C++14 TESTS 13 15 0 800
73783478 k12shreyam A March 20, 2020, 10:41 a.m. OK GNU C++17 TESTS 13 15 0 800
73829791 raghav_chadha A March 20, 2020, 7:51 p.m. OK GNU C++17 TESTS 13 15 0 800
73811060 ans_human A March 20, 2020, 4:34 p.m. OK GNU C++17 TESTS 13 15 0 800
73806238 Alien_sam A March 20, 2020, 3:24 p.m. OK GNU C++17 TESTS 13 15 0 800
73803918 Ignatos A March 20, 2020, 2:55 p.m. OK GNU C++17 TESTS 13 15 0 800
73801800 sk_singh A March 20, 2020, 2:30 p.m. OK GNU C++17 TESTS 13 15 0 800
73801051 EIMU_EMON A March 20, 2020, 2:21 p.m. OK GNU C++17 TESTS 13 15 0 800
73796230 Ferrarixxx A March 20, 2020, 1:24 p.m. OK GNU C++17 TESTS 13 15 0 800
73790012 azora_ahai A March 20, 2020, 12:09 p.m. OK GNU C++17 TESTS 13 15 0 800
73784783 Domeanor A March 20, 2020, 11:01 a.m. OK GNU C++17 TESTS 13 15 0 800
73428816 ruslanjan A March 16, 2020, 5:35 p.m. OK Go TESTS 13 31 0 800
73341993 utsav_deep A March 15, 2020, 2:17 p.m. OK Go TESTS 13 31 0 800
73311087 himself A March 15, 2020, 7:10 a.m. OK Go TESTS 13 31 0 800
73303902 nsaeki A March 15, 2020, 5:17 a.m. OK Go TESTS 13 31 307200 800
73651372 picknight-7 A March 19, 2020, 12:17 p.m. OK Go TESTS 13 46 0 800
73549269 proba A March 18, 2020, 7:52 a.m. OK Go TESTS 13 46 102400 800
73378467 _JM A March 16, 2020, 3:41 a.m. OK Go TESTS 13 46 102400 800
73508126 primelee A March 17, 2020, 5:04 p.m. OK Go TESTS 13 62 0 800
73549514 cashitsuki A March 18, 2020, 7:56 a.m. OK Haskell TESTS 13 31 0 800
73410994 Platinumda A March 16, 2020, 1:25 p.m. OK Haskell TESTS 13 31 102400 800
73549660 cashitsuki A March 18, 2020, 7:59 a.m. OK Haskell TESTS 13 46 102400 800
73466523 pennyIsLove A March 17, 2020, 8:41 a.m. OK Java 11 TESTS 13 171 0 800
73540570 mr___hacker____ A March 18, 2020, 5:35 a.m. OK Java 11 TESTS 13 187 0 800
73366231 soumitri12 A March 15, 2020, 8:10 p.m. OK Java 11 TESTS 13 187 0 800
73326419 rajparekh2024 A March 15, 2020, 10:53 a.m. OK Java 11 TESTS 13 187 0 800
73550512 Clowyy A March 18, 2020, 8:12 a.m. OK Java 11 TESTS 13 202 0 800
73470864 nickleoden299 A March 17, 2020, 9:48 a.m. OK Java 11 TESTS 13 202 0 800
73444720 AndreZWei A March 16, 2020, 11:11 p.m. OK Java 11 TESTS 13 202 0 800
73438349 deshwalaruj A March 16, 2020, 8:10 p.m. OK Java 11 TESTS 13 202 0 800
73356016 nt_7 A March 15, 2020, 5:21 p.m. OK Java 11 TESTS 13 202 0 800
73351860 Watch_Dog_Vintorez A March 15, 2020, 4:33 p.m. OK Java 11 TESTS 13 202 0 800
73284469 abdalrhman_janem A March 14, 2020, 7:48 p.m. OK Java 8 TESTS 13 93 0 800
73805397 sanketmakani A March 20, 2020, 3:15 p.m. OK Java 8 TESTS 13 108 0 800
73562298 Abdallah_Ragab00 A March 18, 2020, 11:02 a.m. OK Java 8 TESTS 13 108 0 800
73456162 Mr.Gzj A March 17, 2020, 5:52 a.m. OK Java 8 TESTS 13 108 0 800
73561112 amolpratap007 A March 18, 2020, 10:45 a.m. OK Java 8 TESTS 13 109 0 800
73744444 deepu_10 A March 19, 2020, 9:44 p.m. OK Java 8 TESTS 13 109 0 800
73736902 fang9 A March 19, 2020, 6:23 p.m. OK Java 8 TESTS 13 109 0 800
73656553 formalist A March 19, 2020, 1:27 p.m. OK Java 8 TESTS 13 109 0 800
73582916 pseudosodium A March 18, 2020, 3:10 p.m. OK Java 8 TESTS 13 109 0 800
73578086 aman28rwt A March 18, 2020, 2:13 p.m. OK Java 8 TESTS 13 109 0 800
73286586 puzzler29 A March 14, 2020, 8:25 p.m. OK JavaScript TESTS 13 31 1024000 800
73383218 Spheniscine A March 16, 2020, 5:54 a.m. OK Kotlin TESTS 13 109 0 800
73335878 SlavaG A March 15, 2020, 12:57 p.m. OK Kotlin TESTS 13 124 0 800
73287579 strelas A March 14, 2020, 8:45 p.m. OK Kotlin TESTS 13 124 0 800
73386442 supremo_kot A March 16, 2020, 7 a.m. OK Kotlin TESTS 13 140 0 800
73302876 LightYagami674 A March 15, 2020, 4:58 a.m. OK Kotlin TESTS 13 140 0 800
73271842 sid9406 A March 14, 2020, 4:32 p.m. OK Kotlin TESTS 13 140 0 800
73291285 ostroumov A March 14, 2020, 10:22 p.m. OK Kotlin TESTS 13 140 204800 800
73327509 TRR A March 15, 2020, 11:08 a.m. OK Mono C# TESTS 13 46 0 800
73533618 elvladi15 A March 18, 2020, 2:22 a.m. OK Mono C# TESTS 13 46 0 800
73270531 geronimo00 A March 14, 2020, 4:29 p.m. OK Mono C# TESTS 13 61 0 800
73306100 enivek A March 15, 2020, 5:53 a.m. OK Mono C# TESTS 13 62 0 800
73260527 Ruban_Denic A March 14, 2020, 3:56 p.m. OK Mono C# TESTS 13 62 0 800
73547280 maxkh A March 18, 2020, 7:22 a.m. OK Mono C# TESTS 13 62 0 800
73395113 de_loo A March 16, 2020, 9:29 a.m. OK Mono C# TESTS 13 62 0 800
73785493 vjudge3 A March 20, 2020, 11:11 a.m. OK MS C++ TESTS 13 30 0 800
73793619 vjudge1 A March 20, 2020, 12:53 p.m. OK MS C++ TESTS 13 30 0 800
73452504 vjudge4 A March 17, 2020, 4:17 a.m. OK MS C++ TESTS 13 30 0 800
73447511 vjudge4 A March 17, 2020, 1:12 a.m. OK MS C++ TESTS 13 30 0 800
73753052 acrux A March 20, 2020, 2:16 a.m. OK MS C++ TESTS 13 30 0 800
73632343 vjvipuljain A March 19, 2020, 7:38 a.m. OK MS C++ TESTS 13 30 0 800
73432404 Makarov A March 16, 2020, 6:27 p.m. OK MS C++ TESTS 13 30 3993600 800
73793562 vjudge5 A March 20, 2020, 12:53 p.m. OK MS C++ TESTS 13 31 0 800
73797854 vjudge3 A March 20, 2020, 1:42 p.m. OK MS C++ TESTS 13 31 0 800
73787685 vjudge3 A March 20, 2020, 11:40 a.m. OK MS C++ TESTS 13 31 0 800
73447063 vjudge2 A March 17, 2020, 12:51 a.m. OK MS C++ 2017 TESTS 13 15 0 800
73295754 vjudge5 A March 15, 2020, 1:21 a.m. OK MS C++ 2017 TESTS 13 15 0 800
73652434 abocide A March 19, 2020, 12:32 p.m. OK MS C++ 2017 TESTS 13 30 0 800
73256903 happy_cf A March 14, 2020, 3:44 p.m. OK MS C++ 2017 TESTS 13 30 0 800
73261733 Viper_Photon A March 14, 2020, 4 p.m. OK MS C++ 2017 TESTS 13 30 0 800
73264507 sannick01 A March 14, 2020, 4:09 p.m. OK MS C++ 2017 TESTS 13 30 0 800
73315243 tygrysek A March 15, 2020, 8:13 a.m. OK MS C++ 2017 TESTS 13 30 0 800
73540212 2018qwer A March 18, 2020, 5:28 a.m. OK MS C++ 2017 TESTS 13 30 0 800
73649600 varus1088 A March 19, 2020, 11:52 a.m. OK MS C++ 2017 TESTS 13 30 0 800
73791835 fahimh99 A March 20, 2020, 12:31 p.m. OK MS C++ 2017 TESTS 13 31 0 800
73358481 hva A March 15, 2020, 5:57 p.m. OK Node.js TESTS 13 156 1331200 800
73783266 tanakataro A March 20, 2020, 10:38 a.m. OK Node.js TESTS 13 171 409600 800
73738878 yMka.20 A March 19, 2020, 7:29 p.m. OK PascalABC.NET TESTS 13 358 0 800
73279237 mayakin A March 14, 2020, 6:32 p.m. OK PHP TESTS 13 62 0 800
73424284 hritik3878 A March 16, 2020, 4:35 p.m. OK PyPy 2 TESTS 13 124 0 800
73297574 akifpatel A March 15, 2020, 2:28 a.m. OK PyPy 2 TESTS 13 124 0 800
73532824 rmhasan A March 18, 2020, 1:51 a.m. OK PyPy 2 TESTS 13 140 0 800
73457792 Do_Re_Mi A March 17, 2020, 6:23 a.m. OK PyPy 2 TESTS 13 140 0 800
73301823 peijinz A March 15, 2020, 4:34 a.m. OK PyPy 2 TESTS 13 140 0 800
73291766 Zakaria_Foysal A March 14, 2020, 10:37 p.m. OK PyPy 2 TESTS 13 140 0 800
73645304 Ph0enX A March 19, 2020, 10:49 a.m. OK PyPy 2 TESTS 13 155 0 800
73688571 Devil_22138 A March 19, 2020, 3:11 p.m. OK PyPy 3 TESTS 13 139 0 800
73546396 nandini18056 A March 18, 2020, 7:09 a.m. OK PyPy 3 TESTS 13 139 0 800
73303709 I_am_aman A March 15, 2020, 5:14 a.m. OK PyPy 3 TESTS 13 139 0 800
73788144 andriybosik2002 A March 20, 2020, 11:46 a.m. OK PyPy 3 TESTS 13 140 0 800
73657134 neweekoff A March 19, 2020, 1:35 p.m. OK PyPy 3 TESTS 13 140 0 800
73645365 Ph0enX A March 19, 2020, 10:50 a.m. OK PyPy 3 TESTS 13 140 0 800
73636069 Yagya_Deep_Agrawal1 A March 19, 2020, 8:30 a.m. OK PyPy 3 TESTS 13 140 0 800
73619473 suvashkumar A March 19, 2020, 3:13 a.m. OK PyPy 3 TESTS 13 140 0 800
73565013 SriTheCoder A March 18, 2020, 11:38 a.m. OK PyPy 3 TESTS 13 140 0 800
73550531 myvegatablehasexplode A March 18, 2020, 8:13 a.m. OK PyPy 3 TESTS 13 140 0 800
73645261 Ph0enX A March 19, 2020, 10:49 a.m. OK Python 2 TESTS 13 171 0 800
73276342 sirjan13 A March 14, 2020, 6:07 p.m. OK Python 2 TESTS 13 186 0 800
73278365 ComptineDunAutreEte A March 14, 2020, 6:23 p.m. OK Python 2 TESTS 13 187 0 800
73277322 ujjk29 A March 14, 2020, 6:14 p.m. OK Python 2 TESTS 13 187 0 800
73266036 fel2fram A March 14, 2020, 4:15 p.m. OK Python 2 TESTS 13 187 0 800
73290081 elistark A March 14, 2020, 9:45 p.m. OK Python 2 TESTS 13 202 0 800
73635486 parth_99 A March 19, 2020, 8:22 a.m. OK Python 3 TESTS 13 93 0 800
73411305 galactus_1 A March 16, 2020, 1:30 p.m. OK Python 3 TESTS 13 93 0 800
73322375 pavankalyan_10 A March 15, 2020, 9:56 a.m. OK Python 3 TESTS 13 93 0 800
73281791 harshit242018 A March 14, 2020, 7:05 p.m. OK Python 3 TESTS 13 93 0 800
73261570 Tram_Huu_Phuc A March 14, 2020, 3:59 p.m. OK Python 3 TESTS 13 93 0 800
73257869 dilovar.mashrabov A March 14, 2020, 3:47 p.m. OK Python 3 TESTS 13 93 0 800
73578817 146oak A March 18, 2020, 2:22 p.m. OK Python 3 TESTS 13 93 307200 800
73781207 marvenlee A March 20, 2020, 10:07 a.m. OK Python 3 TESTS 13 108 0 800
73661361 zasderjjrr A March 19, 2020, 2:28 p.m. OK Python 3 TESTS 13 108 0 800
73654980 spyking9007 A March 19, 2020, 1:06 p.m. OK Python 3 TESTS 13 108 0 800
73577308 sansen A March 18, 2020, 2:04 p.m. OK Rust TESTS 13 30 0 800
73300346 loujunjie A March 15, 2020, 3:55 a.m. OK Rust TESTS 13 31 0 800
73417768 cotton100pc A March 16, 2020, 3:07 p.m. OK Rust TESTS 13 31 204800 800
73302183 kushwaha_vi A March 15, 2020, 4:42 a.m. OK Scala TESTS 13 171 0 800

remove filters

Back to search problems