ASCII art puzzle discussion


Salut j’ai un problème à l’exécution du programme l’IDE lit rien en sorti, mais pourtant quand je l’exécute sous Visual Studio ça fonctionne très bien…!

Je lit les 5 strings dans une double boucle for et j’enregistre et sépare chaque lettre à l’aide de substr() dans un tableau à 2 dimensions.

Ensuite je concatène le tout dans une string en tenant compte des caractères lu au "cin >> T " et je fait le “cout” de cette string. Dans ma concaténation j’inclus des ‘\n’ pour le changement de ligne.

Quelqu’un pourrait-il m’éclairer…?

Je suis un petit nouveau sur Codingame


I was testing output on each of the ascii letters and the secondary ascii art option doesn’t seem to input properly. anyone else encountering this issue?


Hi guys! I have problems with Lorem Ipsum test, any hints? Writing on swift, passed all other tests


Check that only valid characters…


The strange thing is: when I manually run the M@NH@TT@N test through “custom” it doesn’t work. It says “Fatal error: cannot increment beyond endIndex”. But the autotest is ok, how come?


Is “@” in the list of letters?


Yes, it is) and " " too. So I ran my code through Xcode console application and it works properly to " " symbol in ascii

UPD. Problem is magically solved, added “.” to “unrecognized” symbols. But this is all strange, those mistakes. Ok, never mind)


I’m struggling to understand how I can get past the 5th testcase in this puzzle, not least because I can’t see where this output is coming from -

Found: " .----------------. .---------…-. .----------------. .----------------. .----------------- "
Expected:" .----------------. .---------…-. .----------------. .----------------. .-----------------."

Why does the second character have 3 dots in it? I can see the answers from previous posters relating to the extra ’ - ’ in N, but how does this help? am I supposed to write a load more code to catch the inputted ascii font and fix the output for that specific letter? the first four tests have passed OK.


The second character doesn’t have 3 dots. It’s an ellipsis […], it happens when the answer is too big so the system only show you the start/end of the answer.

Here, the difference is that you print a space while it expected a dot.


Thanks for answering - Ah, the ellipsis makes sense. But how do I get the output to match the expected?


Is this test still working?
The test 5 with “another ascii representation” took me 4 hours to resolve because there is no way to know what to expect without spending a very long time doing reverse engineering :slight_smile:
Maybe i am missing something in the IDE? The expected string is indeed having an ellipsis which makes this simple problem very challenging
Still it was great fun…glad to have finally got my 100% :smiley:


In Javascript is the “ROW” variable only a single line? I don’t seem to be able to print the full alphabet, just a series of “#”'s and " "'s.

Edit: When I print the correct answer the game reads “nothing”, if I print a slightly wrong answer (eg “###” when it should be "### ") it correctly reads the “###”.

I’ve now tried a few things and am very confident that this game is broken on Javascript.

"Standard Output Stream:

Found: Nothing
Expected: # "

When I print any other answer than "### " the game says it expected "### ", it’s only when I print the correct answer it starts doing weird stuff.


The puzzle works fine in javascript. The ROW variable only reads one line but it’s done H times inside a loop, since each letter is H characters tall.

The objective is not to print the full alphabet, it’s to print the phrase given in variable T using the ascii art representation of the alphabet given in the ROW inputs.


I recommend pass the Testcase 4 having in mind that the height and width of the given ASCII characters may vary. If you can pass Testcase 4 with that, you don’t have to do anything to pass Testcase 5.


This is unfortunate. It’s been ages and they still did not provide the characters necessary to solve this puzzle. Who is in charge of this ? Trying to reverse-engineer what is happening during submit (HELLO witth another representation) is not worth my time… I will just move on until it’s fixed.


I think many people solved this puzzle without any reverse-engineering required.


Can you do it right now again. Test 5 is impossible because you don’t know the layout of the ASCII characters required. Please do not answer a question you have not checked yourself. If I am wrong, I’ll accept that but I don’t see how anyone can do it. Besides, there are others above me who had the same problem. Once I know the characters layout, it’s simple. Otherwise it’s guess work, especially if once you submit it, there are more tests that are done. Without iterative feedback, you need to reverse.


Test 5 works totally fine, actually you have to find a way to parse alphabet dynamically, you don’t have to know the exact layout of the ASCII characters while you have width and height of one each letter of the layout


I am sorry. I still don’t get it. In example 1 and example 2, we have the characters’ layout and we know it’s 4x5. However in question 5 you have the layout only if you click on show testcases. So you can actually build a response for 20x11. However you only have MANHATTAN, you can not build HELLO, out of it because E, L and O can be represented in many of ways, that I don’t want to guess. Even this website shows how many variations you can have:

So, now tell me… what obvious information am missing ? The test will scan each line, and I can not build the correct line unless I know the font. And the 20x11 font is not provided. Am I really crazy ?


You have to write MANHATTAN with 20x11 characters given to you in ROW.