← All problemsSign in

Last_factor

Jacob has decided to lower the level down for now and has chosen to solve the following question: You are given a positive integer N. Find the largest factor of N, say X [ Given, X!=N ]. Then, if X comes out to be even, verify that it is present in the number N at even positions only. If X comes out to be an odd number verify that it is present at odd positions only. X may or may not be pres

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start