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