[Community Puzzle] Tile a Floor

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Lisa-Has-Ideas,validated by @Timinator,@_O-MEGA and @jddingemanse.
If you have any issues, feel free to ping them.

Attention, for those who make the puzzle in C, the spaces at the beginning or at the end of the line can be misleading when reading the lines.
Be sure to read the entire line, and handle the newline with “fgetc(stdin)”, or read the entire line with “gets” (which handles the newline on its own).

Do not try to manage the newline with a ‘\n’ in the scanf, there will be problems with the spaces at the beginning or end of the line (I got screwed…).

1 Like

It should be a CoC: there is only one tiling pattern.


Hey Remi – Is there anything that I (as the creator of this) could have done differently to avoid this problem for C people?

I don’t know if it is a real problem, because the stub is good. It’s my bad, I always want to make my codes shorter ^^ the problem can be avoided if the inputs contain quotes (no space at the beginning and the end of the row) but I don’t think you have to change it.

I’d say ideally try to avoid inputs / outputs (not a problem here as there is a border) with trailing spaces (very hard to spot when it’s wrong and means you have to be extra careful reading the inputs in some languages). For this puzzle it wouldn’t change much if spaces weren’t valid in tiles? Probably not worth changing it now though as it’s not a massive problem.

Fun, as usual @Lisa-Has-Ideas. :slightly_smiling_face:

1 Like