Harmonic numbers (2) P58153


Statement
 

pdf   zip

Write a program that reads pairs of numbers nn and mm with nmn \ge m, and for each pair prints HnHmH_n - H_m.

Input

Input consists of several pairs of natural numbers nn and mm such that nmn \ge m.

Output

For every pair, print HnHmH_n - H_m with 10 digits after the decimal point.

Public test cases
  • Input

    3 2
    7 0
    4 4
    100 99
    

    Output

    0.3333333333
    2.5928571429
    0.0000000000
    0.0100000000
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Salvador Roura
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Java Python
    User solutions
    C C++ Java JavaScript Python