Harmonic numbers (2) P58153


Statement
 

pdf   zip

html

Write a program that reads pairs of numbers n and m with nm, and for each pair prints HnHm.

Input

Input consists of several pairs of natural numbers n and m such that nm.

Output

For every pair, print HnHm 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 Python