using System;
namespace restless
{
class Program
{
static void Main(string[] args)
{
int N;
bool _isBin = true;
N = Convert.ToInt32(Console.ReadLine());
N = Math.Abs(N);
while (N > 0)
{
if (N % 10 != 0 && N % 10 != 1)
{
_isBin = false;
break;
}
N /= 10;
}
Console.WriteLine(_isBin);
}
}
}
23
Объяснение:
7F = 112
206 = 134
134 - 112 = 22
22 + 1 = 23