Chef and Chocolates
CodeChefOpen on judge ↗
Alice and bob has m and n numbers of chocolates respectively.Chef loves chocolates. So, he takes chocolates from both Alice and Bob equal to the highest common factor of m and n. Print the number of chocolates Chef will get. Input The first line contains an integer T ,denoting number of test cases Each of the T lines contain two integer M,N given by Alice and Bob respectively Output For each te
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