B - Not so complicated GCD
CodeChefOpen on judge ↗
Today Tom has an important test to take, the test involves computing GCD. Tom remembers that he has been taught how to compute GCD of two numbers but this test seems to be somewhat different, so he needs your help. The problem statement is as follows: You are given two numbers **L** and **R**. Your task is to compute the gcd of numbers in range **[L, R]** (both inclusive). More formally
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