using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Split用法
{
class Program
{
static void Main(string[] args)
{
string binstring = Console.ReadLine();
string eightstring = null;
string str2 = null;
int num = 0;
if (binstring.Length % 3 == 1)
binstring = "00" + binstring;
else if (binstring.Length % 3 == 2)
binstring = "0" + binstring;
for (int i = 0; i < binstring.Length; i = i + 3)
{
num = (Convert.ToInt32(binstring[i]) - 48) * 4 + (Convert.ToInt32(binstring[i + 1]) - 48) * 2 + (Convert.ToInt32(binstring[i + 2]) - 48);
eightstring += num;
}
if (eightstring[0].Equals('0'))
{
for (int i = 1; i < eightstring.Length; i++)
str2 += eightstring[i];
}
Console.WriteLine(str2);
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Split用法
{
class Program
{
static void Main(string[] args)
{
string binstring = Console.ReadLine();
string eightstring = null;
string str2 = null;
int num = 0;
if (binstring.Length % 3 == 1)
binstring = "00" + binstring;
else if (binstring.Length % 3 == 2)
binstring = "0" + binstring;
for (int i = 0; i < binstring.Length; i = i + 3)
{
num = (Convert.ToInt32(binstring[i]) - 48) * 4 + (Convert.ToInt32(binstring[i + 1]) - 48) * 2 + (Convert.ToInt32(binstring[i + 2]) - 48);
eightstring += num;
}
if (eightstring[0].Equals('0'))
{
for (int i = 1; i < eightstring.Length; i++)
str2 += eightstring[i];
}
Console.WriteLine(str2);
Console.ReadKey();
}
}
}