Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Sequence2k_1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int num = 1;
- Console.WriteLine(num);
- while (2*num+1<=n)
- {
- num = num * 2 + 1;
- Console.WriteLine(num);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement