[Community puzzle] Folding Paper

This topic is about the puzzle Folding Paper.

Feel free to send your feedback or ask some help here!


Les tests 8 ply et 8 ply easy ne précise pas le côté à regarder. Par défaut j’ai mis ‘D’. Pour la validation, le côté à regarder change donc je n’atteint pas 100%. Est-ce une erreur dans le test ou dans mon code ?

Ça doit être une erreur dans ton code, chez moi ça passe.

Oui, ok. En C, la lecture de l’entrée avec les deux fgets n’était pas correcte.
Maintenant c’est bon, merci :wink:

Are these tests correct?

The puzzle has been resolved by more than a hundred of our regular users, so there’s most probably no bug. If you have an issue, you can describe it.

1 Like

En quoi est ce qu’elle n’est pas correcte?
Comment avez vous résolu ce problème?
Merci d’avance.

Grace à plopx, il faut augmenter la taille du buffer de order en C

Ok, I got it, thanks

Hi Guys,
Thanks for the wonderful platform!

I am currently testing paper folding puzzle. I get Expected nothing! please let me know if I am doing something silly! thanks.



i’m trying to solve this puzzle in c++,
the 4ply step give me as expected value : 1
but the real result is supposed to be 8 or am i completly missunderstanding the puzzle ?

order DRUL ; view : D

Thank you in advance for answer.
ps : french answer is also good :wink:

Maybe the solution is 2 and you printed 24.

Try to fold by yourself a sheet of paper!


I’m so bad lool.
I wasn’t focus enough.


Thank you !!

the code you get(at least in c) is bugged.

fgets(order, 9, stdin);
receives up to a maximum of 8 characters making the side not to be put in properly in the case of the full 8 letters.
(it gets the 8 letters not the \n in the end of the line making the side get \n and not the letter you should be getting.)

In tests 4 & 5 (both 8 ply tests), the string specifying the ‘side’ contains nothing except a line feed.

What language are they using?

In tests 4 & 5 (both 8 ply tests), the string specifying the ‘side’ contains nothing except a line feed.

I exactly have the same problem as you had, and I still don’t get it. It’s been 10 minutes since I’m trying to fold and unfold a piece of paper and I still see 8 layers from the down side. Am I getting the puzzle wrong?
(fold DRUL, view D)
Thanks for the help!

Here’s the breakdown (hopefully I didn’t make any mistakes):

##Fold D

  • View L: L x 2 = 1 x 2 = 2
  • View U: U + D = 1 + 1 = 2
  • View R: R x 2 = 1 x 2 = 2
  • View D: 1
    ##Fold R
  • View L: L + R = 2 + 2 = 4
  • View U: U x 2 = 2 x 2 = 4
  • View R: 1
  • View D: D x 2 = 1 x 2 = 2
    ##Fold U
  • View L: L x 2 = 4 x 2 = 8
  • View U: 1
  • View R: R x 2 = 1 x 2 = 2
  • View D: D + U = 2 + 4 = 6
    ##Fold L
  • View L: 1
  • View U: U x 2 = 1 x 2 = 2
  • View R: R + L = 2 + 8 = 10
  • View D: D x 2 = 6 x 2 = 12

Do you see it? Is there any specific step you have a question about?

  • danBhentschel