Số thứ N

View as PDF

Submit solution

Points: 1.00 (partial)
Time limit: 1.0s
Memory limit: 256M
Input: stdin
Output: stdout

Author:
Problem type
Allowed languages
Python, Scratch

Cho dãy số có quy luật như sau:

$$5, 8, 13, 20, 29, 40, 53...$$

Hãy tìm số thứ ~N~ của dãy số trên.

Dữ liệu
  • Một dòng gồm một số nguyên dương ~N~ ~(N \le 10^8)~.
Kết quả
  • Một dòng gồm một số tự nhiên là kết quả của bài toán.
Sample Input
5
Sample Output
29

Comments

Please read the guidelines before commenting.



  • -1
    apt2_0227  commented on May 9, 2025, 2:25 p.m.

    n=int(input())
    print(5+(n*n-1))