Skip to main content
4 of 9
edited body
isaacg
  • 42.1k
  • 5
  • 73
  • 213

#Pyth, 64 48 bytes

jdhfqzsTsm^+msXtjCk2U2"<>""
\r.1"",<..>,"dlz

This is the brute force approach, generate all sequences and check whether any sum to the input. Fish diagrams compressed as characters, whose binary representations are the > and <.

Some characters are stripped above, because control characters are used. They are reproduced faithfully here:

Test case.

xxd output:

0000000: 6a64 6866 717a 7354 736d 5e2b 6d73 5874  jdhfqzsTsm^+msXt
0000010: 6a43 6b32 5532 223c 3e22 220a 5c72 1214  jCk2U2"<>"".\r..
0000020: 1b1d 2e31 2222 2c3c 2e2e 3e2c 2264 6c7a  ...1"",<..>,"dlz
isaacg
  • 42.1k
  • 5
  • 73
  • 213