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
212 c.
Top 50%
Thomasdcrt
#2
641 c.
Top 100%
maximec-indy