luogu#P1390. 公约数的和
公约数的和
Background
One day, TIBBAR and LXL competed to see who could first compute the sum of the greatest common divisors of every pair of distinct numbers among the numbers from . LXL is still typing a complicated and lengthy program, hoping to get an answer within . TIBBAR, however, wants to pass in for a decisive win; please help him accomplish this task.
Problem Description
Given , compute
where denotes the greatest common divisor of and .
Input Format
The input consists of a single line with one integer, denoting .
Output Format
Output a single line with one integer representing the answer.
10
67
Hint
Constraints
- For 40% of the testdata, .
- For 100% of the testdata, .
Translated by ChatGPT 5