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 |
---|---|---|---|---|---|---|
1787 | TypeDB Forces 2023 (Div. 1 + Div. 2, Rated, Prizes!) | FINISHED | False | 10800 | 62263463 | Jan. 29, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 13595 ) | B | Number Factorization | PROGRAMMING | greedy math number theory |
B'Given an integer n . Consider all pairs of integer arrays a and p of the same length such that n = prod a_i^{p_i} (i.e. a_1^{p_1} cdot a_2^{p_2} cdot ldots ) ( a_i>1;p_i>0 ) and a_i is the product of some (possibly one) distinct prime numbers. For example, for n = 28 = 2^2 cdot 7^1 = 4^1 cdot 7^1 the array pair a = [2, 7] , p = [2, 1] is correct, but the pair of arrays a = [4, 7] , p = [1, 1] is not, because 4=2^2 is a product of non-distinct prime numbers. Your task is to find the maximum value of sum a_i cdot p_i (i.e. a_1 cdot p_1 + a_2 cdot p_2 + ldots ) over all possible pairs of arrays a and p . Note that you do not need to minimize or maximize the length of the arrays. Each test contains multiple test cases. The first line contains an integer t ( 1 <= t <= 1000 ) -- the number of test cases. Each test case contains only one integer n ( 2 <= n <= 10^9 ). For each test case, print the maximum value of sum a_i cdot p_i . In the first test case, 100 = 10^2 so that a = [10] , p = [2] when sum a_i cdot p_i hits the maximum value 10 cdot 2 = 20 . Also, a = [100] , p = [1] does not work since 100 is not made of distinct prime factors. In the second test case, we can consider 10 as 10^1 , so a = [10] , p = [1] . Notice that when 10 = 2^1 cdot 5^1 , sum a_i cdot p_i = 7 . '... |
TypeDB Forces 2023 (Div. 1 + Div. 2, Rated, Prizes!) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
191163023 | ansergeyg | B | Jan. 29, 2023, 5:33 p.m. | OK | C# 10 | TESTS | 17 | 124 | 409600 | ||
191150977 | Shayan.To | B | Jan. 29, 2023, 4:36 p.m. | OK | C# 8 | TESTS | 17 | 108 | 1945600 | ||
191185215 | LazyRGuy | B | Jan. 29, 2023, 9:51 p.m. | OK | GNU C11 | TESTS | 18 | 46 | 0 | ||
191184421 | LazyRGuy | B | Jan. 29, 2023, 9:39 p.m. | OK | GNU C11 | TESTS | 18 | 46 | 0 | ||
191146326 | namanpahwa20 | B | Jan. 29, 2023, 4:15 p.m. | OK | GNU C11 | TESTS | 17 | 187 | 0 | ||
191191316 | yimuhua | B | Jan. 30, 2023, 12:25 a.m. | OK | GNU C++14 | TESTS | 18 | 15 | 0 | ||
191149641 | spectacle | B | Jan. 29, 2023, 4:30 p.m. | OK | GNU C++14 | TESTS | 17 | 15 | 0 | ||
191149046 | ThreatKnight | B | Jan. 29, 2023, 4:27 p.m. | OK | GNU C++14 | TESTS | 17 | 15 | 0 | ||
191203857 | QQ0508 | B | Jan. 30, 2023, 4:33 a.m. | OK | GNU C++14 | TESTS | 18 | 15 | 0 | ||
191200392 | hexagonwarrior | B | Jan. 30, 2023, 3:33 a.m. | OK | GNU C++14 | TESTS | 18 | 15 | 0 | ||
191159942 | _Angel_Demon_ | B | Jan. 29, 2023, 5:19 p.m. | OK | GNU C++14 | TESTS | 17 | 15 | 102400 | ||
191158533 | havibohra5929 | B | Jan. 29, 2023, 5:12 p.m. | OK | GNU C++14 | TESTS | 17 | 15 | 102400 | ||
191201768 | somashekhar01 | B | Jan. 30, 2023, 3:56 a.m. | OK | GNU C++14 | TESTS | 18 | 15 | 102400 | ||
191191657 | KING_OF_TURTLE | B | Jan. 30, 2023, 12:36 a.m. | OK | GNU C++14 | TESTS | 18 | 15 | 102400 | ||
191169235 | krishna110 | B | Jan. 29, 2023, 6:41 p.m. | OK | GNU C++14 | TESTS | 17 | 15 | 102400 | ||
191181928 | richardl02 | B | Jan. 29, 2023, 8:57 p.m. | OK | GNU C++17 | TESTS | 18 | 15 | 0 | ||
191171970 | Gr1nd_Maester | B | Jan. 29, 2023, 7:02 p.m. | OK | GNU C++17 | TESTS | 17 | 15 | 0 | ||
191169829 | -skyline- | B | Jan. 29, 2023, 6:45 p.m. | OK | GNU C++17 | TESTS | 17 | 15 | 0 | ||
191161447 | khushisinghal22 | B | Jan. 29, 2023, 5:26 p.m. | OK | GNU C++17 | TESTS | 17 | 15 | 0 | ||
191155576 | Mark_Waleo | B | Jan. 29, 2023, 4:58 p.m. | OK | GNU C++17 | TESTS | 17 | 15 | 0 | ||
191154638 | saumya.sharma810 | B | Jan. 29, 2023, 4:53 p.m. | OK | GNU C++17 | TESTS | 17 | 15 | 0 | ||
191150754 | rohit_01042002 | B | Jan. 29, 2023, 4:35 p.m. | OK | GNU C++17 | TESTS | 17 | 15 | 0 | ||
191200718 | 2000030696 | B | Jan. 30, 2023, 3:38 a.m. | OK | GNU C++17 | TESTS | 18 | 15 | 0 | ||
191195667 | sonugupta07 | B | Jan. 30, 2023, 2:09 a.m. | OK | GNU C++17 | TESTS | 18 | 15 | 0 | ||
191182624 | jemy25 | B | Jan. 29, 2023, 9:08 p.m. | OK | GNU C++17 | TESTS | 18 | 15 | 0 | ||
191170560 | Errichto | B | Jan. 29, 2023, 6:50 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 15 | 0 | ||
191209485 | sbansal1999 | B | Jan. 30, 2023, 5:59 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 0 | ||
191204305 | Hytidel | B | Jan. 30, 2023, 4:40 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 0 | ||
191192379 | wumingen | B | Jan. 30, 2023, 12:58 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 0 | ||
191191993 | colazcy | B | Jan. 30, 2023, 12:46 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 0 | ||
191190916 | mixed_juice717 | B | Jan. 30, 2023, 12:13 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 0 | ||
191178571 | mesbah19 | B | Jan. 29, 2023, 8:13 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 0 | ||
191149598 | Alkaser_ID | B | Jan. 29, 2023, 4:30 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 15 | 0 | ||
191147721 | Mathison_Turing | B | Jan. 29, 2023, 4:22 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 15 | 0 | ||
191192971 | Once_I_Liked_AGirl | B | Jan. 30, 2023, 1:11 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 204800 | ||
191206596 | David9006 | B | Jan. 30, 2023, 5:18 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 0 | ||
191206595 | xboy | B | Jan. 30, 2023, 5:18 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 0 | ||
191204019 | ayush567 | B | Jan. 30, 2023, 4:35 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 0 | ||
191202885 | Masker2004 | B | Jan. 30, 2023, 4:14 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 0 | ||
191207181 | thehkd_t7 | B | Jan. 30, 2023, 5:28 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 0 | ||
191200386 | xuanthangnguyen10c2 | B | Jan. 30, 2023, 3:33 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 0 | ||
191199999 | kshqsz | B | Jan. 30, 2023, 3:27 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 0 | ||
191207948 | SAHAL01 | B | Jan. 30, 2023, 5:39 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 0 | ||
191208306 | VJlinkhero | B | Jan. 30, 2023, 5:44 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 0 | ||
191201522 | lllllyy | B | Jan. 30, 2023, 3:52 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 15 | 0 | ||
191154634 | mohito22 | B | Jan. 29, 2023, 4:53 p.m. | OK | Go | TESTS | 17 | 46 | 102400 | ||
191169727 | _samit_ | B | Jan. 29, 2023, 6:44 p.m. | OK | Go | TESTS | 17 | 46 | 921600 | ||
191169974 | Utkarsh99 | B | Jan. 29, 2023, 6:46 p.m. | OK | Java 11 | TESTS | 17 | 202 | 0 | ||
191157049 | scc9811 | B | Jan. 29, 2023, 5:05 p.m. | OK | Java 11 | TESTS | 17 | 202 | 0 | ||
191153248 | Utkarsh99 | B | Jan. 29, 2023, 4:47 p.m. | OK | Java 11 | TESTS | 17 | 202 | 0 | ||
191151051 | deepakanto | B | Jan. 29, 2023, 4:36 p.m. | OK | Java 11 | TESTS | 17 | 218 | 0 | ||
191202831 | Dinesh_Pandiyan | B | Jan. 30, 2023, 4:13 a.m. | OK | Java 11 | TESTS | 18 | 233 | 0 | ||
191155145 | nirmalbisht9963 | B | Jan. 29, 2023, 4:56 p.m. | OK | Java 11 | TESTS | 17 | 249 | 0 | ||
191142177 | prakhars_18 | B | Jan. 29, 2023, 3:59 p.m. | OK | Java 11 | TESTS | 17 | 264 | 40345600 | ||
191144474 | pavanRamagiri | B | Jan. 29, 2023, 4:08 p.m. | OK | Java 11 | TESTS | 17 | 295 | 0 | ||
191155743 | noob_programmer9 | B | Jan. 29, 2023, 4:58 p.m. | OK | Java 11 | TESTS | 17 | 311 | 0 | ||
191147649 | Hum_nSharma | B | Jan. 29, 2023, 4:21 p.m. | OK | Java 11 | TESTS | 17 | 342 | 0 | ||
191147918 | Mawina | B | Jan. 29, 2023, 4:23 p.m. | OK | Java 17 | TESTS | 17 | 218 | 512000 | ||
191146927 | seanjyjy | B | Jan. 29, 2023, 4:18 p.m. | OK | Java 17 | TESTS | 17 | 249 | 204800 | ||
191193941 | Jatinydv17 | B | Jan. 30, 2023, 1:34 a.m. | OK | Java 17 | TESTS | 18 | 264 | 614400 | ||
191171176 | bleach__ | B | Jan. 29, 2023, 6:55 p.m. | OK | Java 17 | TESTS | 17 | 264 | 819200 | ||
191151700 | aryan21520 | B | Jan. 29, 2023, 4:39 p.m. | OK | Java 17 | TESTS | 17 | 296 | 307200 | ||
191158138 | john9999911 | B | Jan. 29, 2023, 5:10 p.m. | OK | Java 17 | TESTS | 17 | 296 | 716800 | ||
191147318 | vinaysaraswat33 | B | Jan. 29, 2023, 4:20 p.m. | OK | Java 17 | TESTS | 17 | 311 | 614400 | ||
191144537 | NguyenHuy-lang | B | Jan. 29, 2023, 4:08 p.m. | OK | Java 17 | TESTS | 17 | 327 | 1126400 | ||
191143154 | ajjugupta | B | Jan. 29, 2023, 4:03 p.m. | OK | Java 17 | TESTS | 17 | 343 | 614400 | ||
191146543 | yashsrivastava2603 | B | Jan. 29, 2023, 4:16 p.m. | OK | Java 17 | TESTS | 17 | 358 | 204800 | ||
191144810 | raj_shahh | B | Jan. 29, 2023, 4:09 p.m. | OK | Java 8 | TESTS | 17 | 109 | 0 | ||
191205352 | rahul_81 | B | Jan. 30, 2023, 4:59 a.m. | OK | Java 8 | TESTS | 18 | 124 | 0 | ||
191173382 | aryamanhello | B | Jan. 29, 2023, 7:15 p.m. | OK | Java 8 | TESTS | 18 | 124 | 0 | ||
191157094 | ne_prajwal | B | Jan. 29, 2023, 5:05 p.m. | OK | Java 8 | TESTS | 17 | 124 | 0 | ||
191198825 | HMETAO | B | Jan. 30, 2023, 3:08 a.m. | OK | Java 8 | TESTS | 18 | 140 | 0 | ||
191145624 | yadavDipesh | B | Jan. 29, 2023, 4:13 p.m. | OK | Java 8 | TESTS | 17 | 140 | 0 | ||
191208262 | yashu762001 | B | Jan. 30, 2023, 5:43 a.m. | OK | Java 8 | TESTS | 18 | 171 | 0 | ||
191146936 | superyash | B | Jan. 29, 2023, 4:18 p.m. | OK | Java 8 | TESTS | 17 | 171 | 0 | ||
191145569 | IanISam | B | Jan. 29, 2023, 4:12 p.m. | OK | Java 8 | TESTS | 17 | 171 | 0 | ||
191144530 | cys02 | B | Jan. 29, 2023, 4:08 p.m. | OK | Java 8 | TESTS | 17 | 171 | 0 | ||
191147767 | CyberSnake | B | Jan. 29, 2023, 4:22 p.m. | OK | MS C++ 2017 | TESTS | 17 | 15 | 0 | ||
191155392 | whiteReboot | B | Jan. 29, 2023, 4:57 p.m. | OK | MS C++ 2017 | TESTS | 17 | 31 | 0 | ||
191144792 | Ghostdog | B | Jan. 29, 2023, 4:09 p.m. | OK | MS C++ 2017 | TESTS | 17 | 31 | 204800 | ||
191203640 | 1434314294 | B | Jan. 30, 2023, 4:30 a.m. | OK | MS C++ 2017 | TESTS | 18 | 31 | 1024000 | ||
191182011 | gavvah | B | Jan. 29, 2023, 8:58 p.m. | OK | MS C++ 2017 | TESTS | 18 | 46 | 0 | ||
191177681 | maxK99 | B | Jan. 29, 2023, 8:02 p.m. | OK | MS C++ 2017 | TESTS | 18 | 61 | 409600 | ||
191155232 | scc4 | B | Jan. 29, 2023, 4:56 p.m. | OK | MS C++ 2017 | TESTS | 17 | 62 | 125235200 | ||
191186521 | curiousdragon49 | B | Jan. 29, 2023, 10:17 p.m. | OK | MS C++ 2017 | TESTS | 18 | 93 | 0 | ||
191156767 | _.prateek._.singh._ | B | Jan. 29, 2023, 5:03 p.m. | OK | MS C++ 2017 | TESTS | 17 | 93 | 0 | ||
191156485 | kuuuuu | B | Jan. 29, 2023, 5:02 p.m. | OK | MS C++ 2017 | TESTS | 17 | 234 | 0 | ||
191153565 | alsrb0504 | B | Jan. 29, 2023, 4:48 p.m. | OK | Node.js | TESTS | 17 | 109 | 2355200 | ||
191194763 | shasta0312 | B | Jan. 30, 2023, 1:52 a.m. | OK | Node.js | TESTS | 18 | 155 | 2560000 | ||
191143774 | Nanouklol | B | Jan. 29, 2023, 4:05 p.m. | OK | Node.js | TESTS | 17 | 265 | 2252800 | ||
191142791 | archittect | B | Jan. 29, 2023, 4:02 p.m. | OK | PyPy 3 | TESTS | 17 | 171 | 4915200 | ||
191176830 | bpdolson | B | Jan. 29, 2023, 7:52 p.m. | OK | PyPy 3 | TESTS | 18 | 202 | 4812800 | ||
191203509 | mixed_juice717 | B | Jan. 30, 2023, 4:27 a.m. | OK | PyPy 3 | TESTS | 18 | 233 | 5120000 | ||
191159089 | Cypher13 | B | Jan. 29, 2023, 5:14 p.m. | OK | PyPy 3 | TESTS | 17 | 233 | 7372800 | ||
191149408 | Snake_Eyes1999 | B | Jan. 29, 2023, 4:29 p.m. | OK | PyPy 3 | TESTS | 17 | 248 | 6041600 | ||
191191264 | ikoma | B | Jan. 30, 2023, 12:23 a.m. | OK | PyPy 3 | TESTS | 18 | 249 | 2457600 | ||
191178003 | star-1ord | B | Jan. 29, 2023, 8:05 p.m. | OK | PyPy 3 | TESTS | 18 | 249 | 5529600 | ||
191147065 | mohak_k | B | Jan. 29, 2023, 4:18 p.m. | OK | PyPy 3 | TESTS | 17 | 264 | 4608000 | ||
191142982 | MagicFrank | B | Jan. 29, 2023, 4:02 p.m. | OK | PyPy 3 | TESTS | 17 | 264 | 5120000 | ||
191149718 | Andy_Huo | B | Jan. 29, 2023, 4:30 p.m. | OK | PyPy 3 | TESTS | 17 | 280 | 3993600 | ||
191197344 | eugalt | B | Jan. 30, 2023, 2:42 a.m. | OK | PyPy 3-64 | TESTS | 18 | 109 | 5427200 | ||
191200186 | eugalt | B | Jan. 30, 2023, 3:29 a.m. | OK | PyPy 3-64 | TESTS | 18 | 124 | 4403200 | ||
191196964 | eugalt | B | Jan. 30, 2023, 2:34 a.m. | OK | PyPy 3-64 | TESTS | 18 | 124 | 4608000 | ||
191196742 | eugalt | B | Jan. 30, 2023, 2:30 a.m. | OK | PyPy 3-64 | TESTS | 18 | 124 | 4608000 | ||
191197898 | eugalt | B | Jan. 30, 2023, 2:52 a.m. | OK | PyPy 3-64 | TESTS | 18 | 140 | 4505600 | ||
191182074 | Omar.Gawdat | B | Jan. 29, 2023, 8:59 p.m. | OK | PyPy 3-64 | TESTS | 18 | 155 | 4812800 | ||
191181927 | Omar.Gawdat | B | Jan. 29, 2023, 8:57 p.m. | OK | PyPy 3-64 | TESTS | 18 | 155 | 4812800 | ||
191169984 | Mustela_Erminea | B | Jan. 29, 2023, 6:46 p.m. | OK | PyPy 3-64 | TESTS | 17 | 155 | 5836800 | ||
191177072 | shash4321 | B | Jan. 29, 2023, 7:55 p.m. | OK | PyPy 3-64 | TESTS | 18 | 155 | 9216000 | ||
191188943 | hkwu6013 | B | Jan. 29, 2023, 11:11 p.m. | OK | PyPy 3-64 | TESTS | 18 | 156 | 7065600 | ||
191156182 | unbrokenheart | B | Jan. 29, 2023, 5 p.m. | OK | Python 3 | TESTS | 17 | 514 | 204800 | ||
191152015 | Dotproduct | B | Jan. 29, 2023, 4:41 p.m. | OK | Python 3 | TESTS | 17 | 857 | 0 | ||
191156061 | pingmehard | B | Jan. 29, 2023, 5 p.m. | OK | Python 3 | TESTS | 17 | 967 | 0 | ||
191159638 | guzzeeva | B | Jan. 29, 2023, 5:17 p.m. | OK | Python 3 | TESTS | 17 | 997 | 0 | ||
191169698 | fQuark | B | Jan. 29, 2023, 6:44 p.m. | OK | Rust 2021 | TESTS | 17 | 62 | 409600 |
Back to search problems