Dãy số cộng

View as PDF

Submit solution

Points: 100.00 (partial)
Time limit: 1.0s
Memory limit: 102M
Input: stdin
Output: stdout

Author:
Problem type

Cho dãy số có quy luật như sau: 4,7,10,13,16,… Hãy tìm số thứ N của dãy số trên.

Dữ liệu vào: Gồm một số tự nhiên ~N (N≤ 10^{10})~.

Kết quả: Gồm một số tự nhiên là kết quả của bài toán.

Ví dụ:
Input
3
Output
10

Subtasks:

  • Subtask 1: 60% số điểm có ~N≤ 10^6~.
  • Subtask 2: 40% số điểm không có ràng buộc gì thêm.

Comments

Please read the guidelines before commenting.



  • 0
    TriLam2016  commented on March 11, 2026, 11:50 a.m.

    n=int(input()) print(n*3+1)