Naruto & Sasuke
CodeChefOpen on judge ↗
# PROBLEM: #####It's a pleasant sunny day in the hidden leaf village! The members of team 7 are chilling out at some place. #####Naruto and Sasuke are playing a game. Both of them are at a height **X** . In each jump Naruto moves up by height **A** and Sasuke moves up by height **B**. Naruto and Sasuke want to know which is the next height which will be visited by both of them. #####Meanwhile S
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