โ† Nagarro questions

Count pairs with HCF 1 less than n

Filed under Nagarro

Given an integer n, find the number of pairs (x, y) such that 1 <= x < y < n and their highest common factor (HCF / GCD) is equal to 1.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Nagarro questions

Collected from public candidate posts and coding forums. Updated Nov 2026.