Пример #1
0
        static void Main()
        {
            var ss = new StreamScanner(new StreamReader(Console.OpenStandardInput()));
            var sw = new StreamWriter(Console.OpenStandardOutput())
            {
                AutoFlush = false
            };

            new Program().Solve(ss, sw);
            sw.Flush();
        }
Пример #2
0
        void Solve(StreamScanner ss, StreamWriter sw)
        {
            //---------------------------------
            const long ??? = 2000000000000;
            var A = ss.Next(long.Parse);
            var K = ss.Next(long.Parse);

            if (K == 0)
            {
                sw.WriteLine(??? -A);
                return;
            }

            var day = 0;

            while (A < ???)
            {
                A += 1 + K * A;
                day++;
            }

            sw.WriteLine(day);
            //---------------------------------
        }