Java Bài 8.A8: Tính tổng 5.(Đệ Quy)


LÀM BÀI

Points: 10 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Tính tổng S(n) = 1/1 + 1/2 + 1/3 + ... + 1/n bằng đệ quy.

Input Format

Số nguyên dương n.(1≤n≤1000)

Constraints

.

Output Format

In ra S(n) lấy 3 số sau dấu phẩy.

Ví dụ:

Dữ liệu vào
5
Dữ liệu ra
2.283

Comments

There are no comments at the moment.

Zalo