ASCII art puzzle discussion


#464

Thx a lot !
IFS same my day !


#465

I cannot pass C# test 5 - MANHATTAN with another ASCII representation. When I output each line of the ROW string I get broken characters instead of the ABC… block as expected. Is anyone else getting unexpected result with the ROW string for Test case 5.

This is what the first 3 letters look like when I loop through with Console.Error.WriteLine(ROW);:
.----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. |

| || | | | | | | || | | __ / | || | ‘.-. | | _/ / \ \_ | || | _| |__) | | || | \..’\ | |
| ||
| |
|| || | |_____/ | || | `._____.’ | |
| | | || | | || | | |
| ‘--------------’ || ‘--------------’ || ‘--------------’ |
‘----------------’ ‘----------------’ ‘----------------’


#466

I’m having lots of troubles on doing this puzzle, can somene give me a light? I’m trying to solve it on java.


#467

In the C boilerplate code, there is an fgetc after the fgets call that loads the T variable that shouldn’t be there. It eats the first white space character in the first row of the ASCII art. This caused some confusion for me initially.


#468

Merci ! J’étais passé à côté et du coup en 10 secondes c’est résolu. J’y suis depuis hier !


#469

Attention il n’y a pas que les espaces de différents dans ce test, il y a aussi les 3 petits points… :wink:


#470

Beware, only \n is working and not the \r\n which can be see in expert mode, nor the \r alone. (Javascript test)


#471

I’ve managed to complete all the test cases, but after I hit submit it sits there saying that it’s loading and computing my score, but nothing more happens. How do I get credit for this if I can’t get it to submit?


#472

We had an issue with the platform. It is fixed now. You can submit again to get the results.
I’m sorry it happened :frowning:


#473

Hello, I am a beginner at C programming here. I tried putting the following code inside the ‘for’ loop given, but I cannot pass the tests.

For test 1, the top line of E is off by a little bit. I do not know why, below is my code.

for (int j = 0; j < strlen(T); j++) {
            int index;     // for the alphabet
            if (toupper(T[j]) >= 'A' && toupper(T[j]) <= 'Z')
                index = toupper(T[j]) - 'A';
            for (int k = 0; k < L; k++) {
                printf("%c", ROW[(index * L) + k]);   // e.g. Letter B: we need to print from row[4] to row[7]
            } 
}
printf("\n");

Can anyone help please? Thanks!


#475

Cant do this puzzle, it says expected : "### " found: "### " I’m confused as to what it can be


#476

try to add debug prints in your loop which prints the result. It seems to me you’re printing empty characters.


#477

it’s off because of a getc call aftter fgets. Why this is here Idon’t know but I removed it.


#478

Thanks for your response, the problem was indeed on my end, I got too comfortable with arrays and was printing out of bounds, a rookie mistake on my part. Cheers.


#480

Hello, je sèche sur ce puzzle


#481

Hello all,

I’m stuck on the “M@N@TTH@N” test.
I made a loop if like WangCY code above and the same loop “else if” but like that to write the @ character :

    else if (toupper(T[j]) <= 'A' || toupper(T[j]) >= 'Z')
            {
            for(int x=0;x<L;x++){
                printf("%c",ROW[(taille-4) + x]);
             } 

My code crash and write each time the character “?” at the end of each test and for “M@N@TTH@N” test, the output console write this :

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

I don’t understand why the output console is like that and I don’t know how to not read the last character of the array “\0”
Any ideas for how to hanlde the “@” character ?


#482

I think you went out of bounds of the array T. Also, beware of the magic number 4 in your code :wink:


#483

Thanks, that’s it !
I was out of the array and the magic number wasn’t 4 but 5 thank you :slight_smile:


#484

Hello @Maxpeigne
You struggle as me. you can put under the line “raw=input()” : print(raw). And play the first test you will see that it represent all alphabet in ascii format.

so you need to write a program : that parse t string and for each letter you write the index of the corresponding letter from the given table : tab=ABCDEFGHIJKLMNOPQRSTUVWXYZ?

Example
t= !holLa
output:
tab[26]tab[7]tab[14]tab[11]tab[11]tab[0]=?HOLLA


#485

Hello

so you need to write a program : that parse t string and for each letter you write the index of the corresponding letter from the given table : tab=ABCDEFGHIJKLMNOPQRSTUVWXYZ?

Example
t= !holLa
output:
tab[26]tab[7]tab[14]tab[11]tab[11]tab[0]=?HOLLA