#885
Bronze IV
OKTALNI
시간 제한
1s
메모리 제한
32MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Slavko is learning about different numeral systems. Slavko is not the brightest when it comes to math, so he is starting out converting binary numerals to octal. The algorithm Slavko uses is this:

  • Pad the binary numeral with zeros on the left until the number

of digits is divisible by three.

  • Group adjacent binary digits into groups of 3 digits.

  • Replace each group of binary digits with the corresponding

octal digit (as in the table on the right). Write a program that converts a binary numeral to octal so that Slavko can verify his results. 000 0 001 1 010 2 011 3 100 4 101 5 110 6 111 7

입력

The input contains a binary numeral. The number of digits will be less than 100, and the first digit will be 1.

출력

Output the number in octal.

예제 입력 1

1010

예제 출력 1

12

예제 입력 2

11001100

예제 출력 2

314
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Bronze IV1명 투표· 약 1개월 전
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.