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 2
miles
  • 17.3k
  • 2
  • 31
  • 95

Jelly, 6 bytes

OI>0IẠ

Based on @sanchises' answer.

Try it online! or Verify all.

Explanation

OI>0IẠ Input: string S
O Convert each char in S to an ordinal
 I Get the increments between each pair
 >0 Test if each is positive, 1 if true else 0
 I Get the increments between each pair
 Ạ Test if the list doesn't contain a zero, 1 if true else 0
miles
  • 17.3k
  • 2
  • 31
  • 95

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