GCD evaluator
CodeChefOpen on judge ↗
Consider three values which are identified by N,a,b to form numbers A and B. A is formed by concatenating N by itself a number of times and B is formed by concatenating N by itself b number of times. Find the GCD of the numbers A and B. Input Format A single line containing three space-separated positive integers: N,a and b. Output Format Print the GCD of A and B on a single line. The length o
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