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

Return to Revisions

1 of 3
rev
  • 39
  • 3

05AB1E, 17 bytes

" "Ç©IED®âO«]I¢

Try it online!

Explanation

" " String containing code points for 6, 9, and 20
 Ç Convert code points to integer list to get [6, 9, 20]
 © Store this list in register_c
 IE Loop <input> number of times
 ®â Cartesian product stack contents with list in register_c
 O Sum up the contents of each sub array
 D « List duplicated before taking Cartesian product, concat
 ] End for loop
 I¢ Count occurences of input

Try it online!

rev
  • 39
  • 3

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