Un Ascii Art

Find the number represented by the ASCII art.

Medium5/28/2024

Problem statement

Given a multi-line ASCII art representation of a number, return the number it represents.

Each digit is represented by a 6x5 font and the digits are separated by 2 columns of spaces. The number never start with a 0.

Here are all the digits in the font:

 ####    ####   ######   ####   ######     ##    ####    ####     ##     #### 
##  ##  ##  ##     ##   ##      ##        ###   ##  ##  ##  ##   ###    ##  ##
 #####   ####     ##    ####    ####     ## ##     ##      ##     ##    ##  ##
   ##   ##  ##   ##     ##  ##     ##   ######  ##  ##   ##       ##    ##  ##
 ###     ####   ##       ####   ####       ##    ####   ######  ######   #### 

For example, given the ASCII art:

 ####    ####     ##     #### 
##      ##  ##   ###    ##  ##
####     ####     ##     #####
##  ##  ##  ##    ##       ## 
 ####    ####   ######   ###  

You need to output the number 6819.

Problem leaderboard

#
Size
%
Users
#1
150 c.
Top 25%
Natanaelel
#2
212 c.
Top 50%
Thomasdcrt
#3
253 c.
Top 75%
SephQ
#4
641 c.
Top 100%
maximec-indy