Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Timeline for Make me a shape

Current License: CC BY-SA 4.0

10 events
when toggle format what by license comment
Sep 2, 2021 at 8:22 comment added ovs @KevinCruijssen Yes that works, thanks again
Sep 2, 2021 at 8:21 history edited ovs CC BY-SA 4.0
added 35 characters in body
Sep 2, 2021 at 7:59 comment added Kevin Cruijssen Ah, I misread the challenge regarding the second part. You're indeed correct that it has 1-4 layers, and empty layers should be removed, so your approach was correct. I think you can remove the g for another -1, though? Ā will be truthy for a non-empty string and falsey for "".
Sep 2, 2021 at 7:45 comment added ovs @KevinCruijssen Thanks for the -1! But for the second part of your comment the challenge states A shape is 1-4 layers [...], and since layers can't be empty this implies the output is not empty. '-8×K removes empty layers, no? With your suggestion the output always has 4 layers.
Sep 2, 2021 at 7:08 comment added Kevin Cruijssen 4L to 4 for -1. Also, the challenge states it can't have an empty layer, not that the entire output can't be empty. So '-8×K':ýDgĀ# is incorrect, since it only checks if the entire shape is empty. You can fix this with ':ýD'-8×å≠#, which is also 1 byte shorter.
Aug 25, 2021 at 14:23 comment added Shaggy Damnit! Beaten by better string compression! :(
Aug 25, 2021 at 13:29 history edited ovs CC BY-SA 4.0
added 42 characters in body
Aug 25, 2021 at 10:44 history edited ovs CC BY-SA 4.0
added 132 characters in body
Aug 25, 2021 at 9:35 history edited ovs CC BY-SA 4.0
added 849 characters in body
Aug 25, 2021 at 9:27 history answered ovs CC BY-SA 4.0

AltStyle によって変換されたページ (->オリジナル) /