Binary to Octal Conversion
Time limit1sMemory limit128 MB
Convert a binary number with up to 1,000,000 digits into its octal representation.
- Level
Easy3 of 10
- Topics
- Bit manipulation, Math, String, Implementation
- Solved
- No attempts yet
Problem
Given a number written in binary, write a program that converts it to octal.
Input
The first line contains one binary number. Its length is between 1 and 1,000,000, inclusive.
Output
Print the octal representation of the given binary number on the first line.