Java Bài 8.A6: Số fibonacci.(Đệ Quy)


LÀM BÀI

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

Author:
Problem type

Dãy số fibonacci là dãy số thỏa mãn : F1=0, F2=1, Fn=Fn-1+Fn-2. Hãy tìm số Fibonacci thứ n sử dụng đệ quy.

Input Format

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

Constraints

.

Output Format

In ra số Fibonacci thứ n.

Ví dụ:

Dữ liệu vào
2
Dữ liệu ra
1

Comments

There are no comments at the moment.

Zalo