Boruto and Sarada
CodeChefOpen on judge ↗
Boruto and Sarada both desperately wanted to become Hokage. The Academy in the Leaf Village seeing their desperation decided to conduct a test, just to keep them motivated for their goal. In the test, they were given 2 integers X and Y, and the task was to check if it is possible to express X as a sum of Y distinct positive integers (i.e. as the sum of integers greater than 0). Both were intellig
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