Sum of fractions

Write a program that reads triples of natural numbers aa, bb and kk, and for each one computes and prints the result of 1a+1a+k+1a+2k+\frac{1}{a} + \frac{1}{a+k} + \frac{1}{a+2k} + \dots for all fractions with denominator smaller than or equal to bb.

Input

Input consists of several triples of natural numbers aa, bb and kk, such that 1ab1 \le a\le b and k1k \ge 1.

Output

For each triple, print in a line the result of the sum with four digits after the decimal point.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:52:16.876Z

© Jutge.org, 2006–2026.
https://jutge.org