e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Problems

Degree of two

published at 8/7/20, 5:09:19 pm

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Numerics;

namespace _119 { class Program { static void Main(string[] args) { string a = Console.ReadLine(), b = ""; BigInteger n = 1; int say = 0; while (b.Length != a.Length) { say++; n *= 2; b = n + b; } Console.WriteLine(say); } } }