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

2 of 3
added 172 characters in body
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

MATL, 5 bytes

t:Ypm

Try it online!

###Explanation

t % Implicit input. Duplicate
: % Range from 1 to that
Yp % Cumulative product
m % Ismember. Implicit display
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

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