Highestcommonfactor
CodeChefOpen on judge ↗
Meena and Vaibhav had $M$ and $N$ rupees respectively. They have planned to go goa for a trip. So they wanted some extra money to spend on the trip. The parents of Meena and Vaibhav decide to give some extra fixed amount of money. That amount is equal to HCF(Highest Common Factor) of $M$ and $N$.You have to find that amount. - For Example: Values of $M$ and $N$ are 10 and 15 respectively. - Factor
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.
Sign in to chat with the tutor and save your progress.
Sign in to start