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.
Problems
B'Ridbit starts with an integer n . In one move, he can perform one of the following operations: A proper divisor is a divisor of a number, excluding itself. For example, 1 , 2 , 4 , 5 , and 10 are proper divisors of 20 , but 20 itself is not. What is the minimum number of moves Ridbit is required to make to reduce n to 1 ? The first line contains a single integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The only line of each test case contains a single integer n ( 1 <= q n <= q 10^9 ). For each test case, output the minimum number of moves required to reduce n to 1 . For the test cases in the example, n may be reduced to 1 using the following operations in sequence 1 2 xrightarrow{} 1 3 xrightarrow{} 2 xrightarrow{} 1 4 xrightarrow{} 2 xrightarrow{} 1 6 xrightarrow{} 2 xrightarrow{} 1 9 xrightarrow{} 3 xrightarrow{} 2 xrightarrow{} 1 '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
99185484 |
0_0perplexed |
A |
Nov. 21, 2020, 4:42 p.m. |
OK |
GNU C11 |
TESTS |
28 |
15 |
0 |
|
|
99216533 |
nitinkumar1729 |
A |
Nov. 22, 2020, 5:01 a.m. |
OK |
GNU C11 |
TESTS |
28 |
31 |
0 |
|
|
99218300 |
AdarshGupta1 |
A |
Nov. 22, 2020, 5:28 a.m. |
OK |
GNU C11 |
TESTS |
28 |
31 |
0 |
|
|
99218809 |
ja1467 |
A |
Nov. 22, 2020, 5:35 a.m. |
OK |
GNU C11 |
TESTS |
28 |
31 |
0 |
|
|
99212215 |
chowdhuryshashwoto |
A |
Nov. 22, 2020, 3:42 a.m. |
OK |
GNU C11 |
TESTS |
28 |
31 |
0 |
|
|
99196002 |
Peace44 |
A |
Nov. 21, 2020, 7:39 p.m. |
OK |
GNU C11 |
TESTS |
28 |
31 |
0 |
|
|
99199595 |
prachi610 |
A |
Nov. 21, 2020, 8:40 p.m. |
OK |
GNU C11 |
TESTS |
28 |
31 |
0 |
|
|
99201412 |
halliday_onice |
A |
Nov. 21, 2020, 9:26 p.m. |
OK |
GNU C11 |
TESTS |
28 |
31 |
0 |
|
|
99209556 |
clozer |
A |
Nov. 22, 2020, 2:36 a.m. |
OK |
GNU C11 |
TESTS |
28 |
31 |
0 |
|
|
99210301 |
ericoder |
A |
Nov. 22, 2020, 2:54 a.m. |
OK |
GNU C11 |
TESTS |
28 |
31 |
0 |
|
|
99217383 |
wzl19371 |
A |
Nov. 22, 2020, 5:14 a.m. |
OK |
GNU C++11 |
TESTS |
28 |
15 |
0 |
|
|
99206586 |
CC2021zyz |
A |
Nov. 22, 2020, 1:05 a.m. |
OK |
GNU C++11 |
TESTS |
28 |
15 |
0 |
|
|
99185640 |
_I_AM_THE_LOWEST_ |
A |
Nov. 21, 2020, 4:42 p.m. |
OK |
GNU C++11 |
TESTS |
28 |
15 |
0 |
|
|
99180612 |
Manuelmm |
A |
Nov. 21, 2020, 4:27 p.m. |
OK |
GNU C++11 |
TESTS |
28 |
15 |
0 |
|
|
99181077 |
BelRiose |
A |
Nov. 21, 2020, 4:29 p.m. |
OK |
GNU C++11 |
TESTS |
28 |
15 |
819200 |
|
|
99216835 |
wux51 |
A |
Nov. 22, 2020, 5:06 a.m. |
OK |
GNU C++11 |
TESTS |
28 |
30 |
0 |
|
|
99216951 |
Ghost2.0 |
A |
Nov. 22, 2020, 5:07 a.m. |
OK |
GNU C++11 |
TESTS |
28 |
30 |
0 |
|
|
99216236 |
FerryPie |
A |
Nov. 22, 2020, 4:57 a.m. |
OK |
GNU C++11 |
TESTS |
28 |
30 |
0 |
|
|
99212288 |
Manan8686 |
A |
Nov. 22, 2020, 3:43 a.m. |
OK |
GNU C++11 |
TESTS |
28 |
30 |
0 |
|
|
99212068 |
kyriezzx |
A |
Nov. 22, 2020, 3:38 a.m. |
OK |
GNU C++11 |
TESTS |
28 |
30 |
0 |
|
|
99194530 |
Jainam_Sanghvi |
A |
Nov. 21, 2020, 7:25 p.m. |
OK |
GNU C++14 |
TESTS |
28 |
30 |
0 |
|
|
99205608 |
mdsaqib |
A |
Nov. 22, 2020, 12:20 a.m. |
OK |
GNU C++14 |
TESTS |
28 |
30 |
0 |
|
|
99211099 |
codespeed |
A |
Nov. 22, 2020, 3:15 a.m. |
OK |
GNU C++14 |
TESTS |
28 |
30 |
0 |
|
|
99216519 |
parthrajchauhan100 |
A |
Nov. 22, 2020, 5:01 a.m. |
OK |
GNU C++14 |
TESTS |
28 |
30 |
0 |
|
|
99220581 |
sidhudog2019 |
A |
Nov. 22, 2020, 6 a.m. |
OK |
GNU C++14 |
TESTS |
28 |
30 |
0 |
|
|
99178537 |
Shin_DmA |
A |
Nov. 21, 2020, 4:21 p.m. |
OK |
GNU C++14 |
TESTS |
28 |
30 |
0 |
|
|
99220178 |
Yash7091 |
A |
Nov. 22, 2020, 5:54 a.m. |
OK |
GNU C++14 |
TESTS |
28 |
31 |
0 |
|
|
99220166 |
sargun99 |
A |
Nov. 22, 2020, 5:54 a.m. |
OK |
GNU C++14 |
TESTS |
28 |
31 |
0 |
|
|
99220614 |
kshitiz1 |
A |
Nov. 22, 2020, 6 a.m. |
OK |
GNU C++14 |
TESTS |
28 |
31 |
0 |
|
|
99220251 |
Satyam1104 |
A |
Nov. 22, 2020, 5:55 a.m. |
OK |
GNU C++14 |
TESTS |
28 |
31 |
0 |
|
|
99195581 |
vmadhu99 |
A |
Nov. 21, 2020, 7:35 p.m. |
OK |
GNU C++17 |
TESTS |
28 |
15 |
0 |
|
|
99178598 |
BaTekha |
A |
Nov. 21, 2020, 4:22 p.m. |
OK |
GNU C++17 |
TESTS |
28 |
15 |
0 |
|
|
99197563 |
puja_biswas |
A |
Nov. 21, 2020, 8:01 p.m. |
OK |
GNU C++17 |
TESTS |
28 |
30 |
0 |
|
|
99196260 |
Connor07 |
A |
Nov. 21, 2020, 7:42 p.m. |
OK |
GNU C++17 |
TESTS |
28 |
30 |
0 |
|
|
99196058 |
zemon_123 |
A |
Nov. 21, 2020, 7:40 p.m. |
OK |
GNU C++17 |
TESTS |
28 |
30 |
0 |
|
|
99195153 |
Tarun953 |
A |
Nov. 21, 2020, 7:30 p.m. |
OK |
GNU C++17 |
TESTS |
28 |
30 |
0 |
|
|
99214018 |
noober123 |
A |
Nov. 22, 2020, 4:19 a.m. |
OK |
GNU C++17 |
TESTS |
28 |
30 |
0 |
|
|
99211373 |
san_65981 |
A |
Nov. 22, 2020, 3:22 a.m. |
OK |
GNU C++17 |
TESTS |
28 |
30 |
0 |
|
|
99198433 |
Siam_2002 |
A |
Nov. 21, 2020, 8:16 p.m. |
OK |
GNU C++17 |
TESTS |
28 |
30 |
0 |
|
|
99197177 |
Reaziii |
A |
Nov. 21, 2020, 7:55 p.m. |
OK |
GNU C++17 |
TESTS |
28 |
30 |
0 |
|
|
99194860 |
Arif19 |
A |
Nov. 21, 2020, 7:28 p.m. |
OK |
GNU C++17 (64) |
TESTS |
28 |
15 |
0 |
|
|
99195086 |
epsilon_573 |
A |
Nov. 21, 2020, 7:30 p.m. |
OK |
GNU C++17 (64) |
TESTS |
28 |
15 |
0 |
|
|
99181178 |
c0nQuEr0r |
A |
Nov. 21, 2020, 4:29 p.m. |
OK |
GNU C++17 (64) |
TESTS |
28 |
15 |
0 |
|
|
99203189 |
Gilgameshx |
A |
Nov. 21, 2020, 10:22 p.m. |
OK |
GNU C++17 (64) |
TESTS |
28 |
15 |
0 |
|
|
99211565 |
over_flow |
A |
Nov. 22, 2020, 3:27 a.m. |
OK |
GNU C++17 (64) |
TESTS |
28 |
15 |
0 |
|
|
99208584 |
return_47 |
A |
Nov. 22, 2020, 2:10 a.m. |
OK |
GNU C++17 (64) |
TESTS |
28 |
30 |
0 |
|
|
99219977 |
kenechi |
A |
Nov. 22, 2020, 5:52 a.m. |
OK |
GNU C++17 (64) |
TESTS |
28 |
30 |
0 |
|
|
99208733 |
Niajul |
A |
Nov. 22, 2020, 2:14 a.m. |
OK |
GNU C++17 (64) |
TESTS |
28 |
30 |
0 |
|
|
99202402 |
user9029 |
A |
Nov. 21, 2020, 9:54 p.m. |
OK |
GNU C++17 (64) |
TESTS |
28 |
30 |
0 |
|
|
99196271 |
f2016941 |
A |
Nov. 21, 2020, 7:42 p.m. |
OK |
GNU C++17 (64) |
TESTS |
28 |
30 |
0 |
|
|
99208835 |
woot4moo |
A |
Nov. 22, 2020, 2:17 a.m. |
OK |
Go |
TESTS |
28 |
46 |
0 |
|
|
99194141 |
_aurthohin_ |
A |
Nov. 21, 2020, 7:23 p.m. |
OK |
Go |
TESTS |
28 |
77 |
0 |
|
|
99219730 |
SAKIB_ALAMIN |
A |
Nov. 22, 2020, 5:48 a.m. |
OK |
Go |
TESTS |
28 |
78 |
0 |
|
|
99211134 |
mphillotry |
A |
Nov. 22, 2020, 3:16 a.m. |
OK |
Java 11 |
TESTS |
28 |
187 |
0 |
|
|
99198685 |
devptyagi01 |
A |
Nov. 21, 2020, 8:21 p.m. |
OK |
Java 11 |
TESTS |
28 |
187 |
0 |
|
|
99198002 |
abdelrahman-yousf |
A |
Nov. 21, 2020, 8:08 p.m. |
OK |
Java 11 |
TESTS |
28 |
202 |
0 |
|
|
99215781 |
TheRunner |
A |
Nov. 22, 2020, 4:49 a.m. |
OK |
Java 11 |
TESTS |
28 |
202 |
0 |
|
|
99212583 |
tejaspradhan |
A |
Nov. 22, 2020, 3:51 a.m. |
OK |
Java 11 |
TESTS |
28 |
217 |
0 |
|
|
99219052 |
T--o_o--T |
A |
Nov. 22, 2020, 5:38 a.m. |
OK |
Java 11 |
TESTS |
28 |
233 |
0 |
|
|
99213388 |
Alphecca4439 |
A |
Nov. 22, 2020, 4:08 a.m. |
OK |
Java 11 |
TESTS |
28 |
233 |
0 |
|
|
99210916 |
kunyinyaw |
A |
Nov. 22, 2020, 3:11 a.m. |
OK |
Java 11 |
TESTS |
28 |
233 |
0 |
|
|
99196709 |
adhi_2311 |
A |
Nov. 21, 2020, 7:48 p.m. |
OK |
Java 11 |
TESTS |
28 |
233 |
0 |
|
|
99219755 |
Geerbani_shashi |
A |
Nov. 22, 2020, 5:49 a.m. |
OK |
Java 11 |
TESTS |
28 |
233 |
0 |
|
|
99219254 |
aym_05 |
A |
Nov. 22, 2020, 5:41 a.m. |
OK |
Java 8 |
TESTS |
28 |
109 |
0 |
|
|
99212738 |
mehtabhavin10 |
A |
Nov. 22, 2020, 3:55 a.m. |
OK |
Java 8 |
TESTS |
28 |
109 |
0 |
|
|
99205819 |
kirubankamaraj |
A |
Nov. 22, 2020, 12:29 a.m. |
OK |
Java 8 |
TESTS |
28 |
109 |
0 |
|
|
99218424 |
mjay4 |
A |
Nov. 22, 2020, 5:30 a.m. |
OK |
Java 8 |
TESTS |
28 |
124 |
0 |
|
|
99209379 |
kbadrinath |
A |
Nov. 22, 2020, 2:32 a.m. |
OK |
Java 8 |
TESTS |
28 |
124 |
0 |
|
|
99206792 |
sumitnitesh123 |
A |
Nov. 22, 2020, 1:14 a.m. |
OK |
Java 8 |
TESTS |
28 |
124 |
0 |
|
|
99202980 |
Snow |
A |
Nov. 21, 2020, 10:16 p.m. |
OK |
Java 8 |
TESTS |
28 |
124 |
0 |
|
|
99199547 |
piyush33patel |
A |
Nov. 21, 2020, 8:39 p.m. |
OK |
Java 8 |
TESTS |
28 |
124 |
0 |
|
|
99199247 |
prezrohit |
A |
Nov. 21, 2020, 8:33 p.m. |
OK |
Java 8 |
TESTS |
28 |
124 |
0 |
|
|
99197808 |
3omar17 |
A |
Nov. 21, 2020, 8:05 p.m. |
OK |
Java 8 |
TESTS |
28 |
124 |
0 |
|
|
99198634 |
TimDev |
A |
Nov. 21, 2020, 8:20 p.m. |
OK |
Kotlin |
TESTS |
28 |
124 |
0 |
|
|
99202741 |
Tlatoani |
A |
Nov. 21, 2020, 10:06 p.m. |
OK |
Kotlin |
TESTS |
28 |
202 |
0 |
|
|
99200689 |
ilia.kot |
A |
Nov. 21, 2020, 9:07 p.m. |
OK |
Mono C# |
TESTS |
28 |
62 |
0 |
|
|
99216059 |
vjudge2 |
A |
Nov. 22, 2020, 4:54 a.m. |
OK |
MS C++ |
TESTS |
28 |
46 |
0 |
|
|
99215287 |
sskhynix |
A |
Nov. 22, 2020, 4:41 a.m. |
OK |
MS C++ 2017 |
TESTS |
28 |
31 |
0 |
|
|
99202986 |
rkdwlss2 |
A |
Nov. 21, 2020, 10:16 p.m. |
OK |
MS C++ 2017 |
TESTS |
28 |
31 |
0 |
|
|
99198730 |
aivaras.kriksciunas |
A |
Nov. 21, 2020, 8:22 p.m. |
OK |
MS C++ 2017 |
TESTS |
28 |
31 |
0 |
|
|
99197666 |
arseniy.yatcheniy |
A |
Nov. 21, 2020, 8:03 p.m. |
OK |
MS C++ 2017 |
TESTS |
28 |
31 |
0 |
|
|
99186710 |
zapMonkey02 |
A |
Nov. 21, 2020, 4:45 p.m. |
OK |
MS C++ 2017 |
TESTS |
28 |
31 |
0 |
|
|
99184781 |
yuee |
A |
Nov. 21, 2020, 4:40 p.m. |
OK |
MS C++ 2017 |
TESTS |
28 |
31 |
0 |
|
|
99212434 |
Siswenter |
A |
Nov. 22, 2020, 3:47 a.m. |
OK |
MS C++ 2017 |
TESTS |
28 |
31 |
0 |
|
|
99187389 |
Triss_Merigold |
A |
Nov. 21, 2020, 4:46 p.m. |
OK |
MS C++ 2017 |
TESTS |
28 |
31 |
307200 |
|
|
99217358 |
htija |
A |
Nov. 22, 2020, 5:14 a.m. |
OK |
MS C++ 2017 |
TESTS |
28 |
46 |
0 |
|
|
99183220 |
Kent7 |
A |
Nov. 21, 2020, 4:35 p.m. |
OK |
MS C++ 2017 |
TESTS |
28 |
46 |
0 |
|
|
99207525 |
henrychenOutlook |
A |
Nov. 22, 2020, 1:38 a.m. |
OK |
Node.js |
TESTS |
28 |
93 |
1228800 |
|
|
99195328 |
batyrbek.zhunis |
A |
Nov. 21, 2020, 7:32 p.m. |
OK |
PHP |
TESTS |
28 |
46 |
409600 |
|
|
99214110 |
codershuvo |
A |
Nov. 22, 2020, 4:20 a.m. |
OK |
PyPy 3 |
TESTS |
28 |
171 |
1638400 |
|
|
99201104 |
caow |
A |
Nov. 21, 2020, 9:18 p.m. |
OK |
PyPy 3 |
TESTS |
28 |
186 |
1843200 |
|
|
99194503 |
prabakar.rangarajan |
A |
Nov. 21, 2020, 7:25 p.m. |
OK |
PyPy 3 |
TESTS |
28 |
187 |
0 |
|
|
99216054 |
codestar_06 |
A |
Nov. 22, 2020, 4:53 a.m. |
OK |
PyPy 3 |
TESTS |
28 |
187 |
2560000 |
|
|
99212313 |
Coding_RDX |
A |
Nov. 22, 2020, 3:44 a.m. |
OK |
PyPy 3 |
TESTS |
28 |
202 |
2457600 |
|
|
99211262 |
hr4_harsh |
A |
Nov. 22, 2020, 3:20 a.m. |
OK |
PyPy 3 |
TESTS |
28 |
202 |
2560000 |
|
|
99205979 |
fazle_rabbi_ferdaus |
A |
Nov. 22, 2020, 12:38 a.m. |
OK |
PyPy 3 |
TESTS |
28 |
202 |
2560000 |
|
|
99204848 |
yoav1248 |
A |
Nov. 21, 2020, 11:39 p.m. |
OK |
PyPy 3 |
TESTS |
28 |
202 |
2560000 |
|
|
99197595 |
crap_the_coder |
A |
Nov. 21, 2020, 8:02 p.m. |
OK |
PyPy 3 |
TESTS |
28 |
202 |
2560000 |
|
|
99197256 |
macdod |
A |
Nov. 21, 2020, 7:56 p.m. |
OK |
PyPy 3 |
TESTS |
28 |
202 |
2560000 |
|
|
99211322 |
biltharesatyendra |
A |
Nov. 22, 2020, 3:21 a.m. |
OK |
Python 2 |
TESTS |
28 |
171 |
0 |
|
|
99219201 |
Vishvesh22201 |
A |
Nov. 22, 2020, 5:41 a.m. |
OK |
Python 3 |
TESTS |
28 |
109 |
0 |
|
|
99215060 |
perseverance123 |
A |
Nov. 22, 2020, 4:37 a.m. |
OK |
Python 3 |
TESTS |
28 |
109 |
0 |
|
|
99214662 |
i_m_arin |
A |
Nov. 22, 2020, 4:30 a.m. |
OK |
Python 3 |
TESTS |
28 |
109 |
0 |
|
|
99213907 |
sh1194 |
A |
Nov. 22, 2020, 4:17 a.m. |
OK |
Python 3 |
TESTS |
28 |
109 |
0 |
|
|
99213483 |
vinaymit |
A |
Nov. 22, 2020, 4:10 a.m. |
OK |
Python 3 |
TESTS |
28 |
109 |
0 |
|
|
99213389 |
sul3 |
A |
Nov. 22, 2020, 4:08 a.m. |
OK |
Python 3 |
TESTS |
28 |
109 |
0 |
|
|
99212226 |
manas123 |
A |
Nov. 22, 2020, 3:42 a.m. |
OK |
Python 3 |
TESTS |
28 |
109 |
0 |
|
|
99209315 |
hakish1234 |
A |
Nov. 22, 2020, 2:30 a.m. |
OK |
Python 3 |
TESTS |
28 |
109 |
0 |
|
|
99202266 |
Glober |
A |
Nov. 21, 2020, 9:49 p.m. |
OK |
Python 3 |
TESTS |
28 |
109 |
0 |
|
|
99197974 |
code_g_forces |
A |
Nov. 21, 2020, 8:08 p.m. |
OK |
Python 3 |
TESTS |
28 |
109 |
0 |
|
|
99210767 |
Strorkis |
A |
Nov. 22, 2020, 3:07 a.m. |
OK |
Rust |
TESTS |
28 |
31 |
0 |
|
|
99216640 |
kanik0 |
A |
Nov. 22, 2020, 5:03 a.m. |
OK |
Rust |
TESTS |
28 |
46 |
0 |
|
|
remove filters
Back to search problems