Tính số Fibo thứ n

View as PDF



Problem types
Points: 100 (p) Time limit: 1.0s Memory limit: 1023M Input: stdin Output: stdout

\(F_1 = F_2=1\)

\(F_n=F_{n-1}+F_{n-2}\) với \(n > 2\)

Tính \(F_n\)

Input

  • Số test \(t (t \le 5)\)
  • \(t\) dòng, mỗi dòng 1 số nguyên dương \(n (n \le 50)\)

Output

  • \(t\) dòng, \(F_n\)

Example

Test 1

Input
3
1
2
3 
Output
1
1
2

Comments

There are no comments at the moment.