Dãy số lẻ cách đều

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: 1,3,5,7,9,… 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.

Input
4
Output
7

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.


There are no comments at the moment.