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 Answer

added 407 characters in body
Source Link

Vyxal, 2228 bytes

⌈'⇩ḣh\h≠$h\s=∧;U56>7*Ẏ⌈'⇩ḣh\h≠$h\s=∧;:ɽ:vḟUİ56>7*Ẏ

Try it Online! Try it Online! or Try some testcases! Mis-deduplication should be fixed now.

⌈'⇩ḣh\h≠$h\s=∧;U56>7*Ẏ⌈'⇩ḣh\h≠$h\s=∧;:ɽ:vḟUİ56>7*Ẏ
⌈' ; Filter input, split on spaces, by:
 ⇩ḣ Push (input lowercased)([0], [1:])
 h\h≠ Second character (input[1:][0]) isn't `h`
 $h\s=∧ and first character isn `s`
 :ɽ Duplicate, lowercase each
 :vḟ  Find first occurrences of each of ^ in ^
 U Uniquify ^
 İ Index ^ into filtered list, resulting
  in the properly deduplicated list
 56> 1 if len(^) is 7 or more, otherwise 0
 7*Ẏ Multiply by 7 and slice [0:that]

Vyxal, 22 bytes

⌈'⇩ḣh\h≠$h\s=∧;U56>7*Ẏ

Try it Online!

⌈'⇩ḣh\h≠$h\s=∧;U56>7*Ẏ
⌈' ; Filter input, split on spaces, by:
 ⇩ḣ Push (input lowercased)([0], [1:])
 h\h≠ Second character isn't `h`
 $h\s=∧ and first character isn `s`
 U Uniquify ^
 56> 1 if len(^) is 7 or more, otherwise 0
 7*Ẏ Multiply by 7 and slice [0:that]

Vyxal, 28 bytes

⌈'⇩ḣh\h≠$h\s=∧;:ɽ:vḟUİ56>7*Ẏ

Try it Online! or Try some testcases! Mis-deduplication should be fixed now.

⌈'⇩ḣh\h≠$h\s=∧;:ɽ:vḟUİ56>7*Ẏ
⌈' ; Filter input, split on spaces, by:
 ⇩ḣ Push (input lowercased)([0], [1:])
 h\h≠ Second character (input[1:][0]) isn't `h`
 $h\s=∧ and first character isn `s`
 :ɽ Duplicate, lowercase each
 :vḟ  Find first occurrences of each of ^ in ^
 U Uniquify ^
 İ Index ^ into filtered list, resulting
  in the properly deduplicated list
 56> 1 if len(^) is 7 or more, otherwise 0
 7*Ẏ Multiply by 7 and slice [0:that]
Fix logic error (me doing Vyxal quickly before going out to do yard work...)
Source Link

Vyxal, 22 bytes

⌈'⇩:h\s=$h\h≠∧;U56>7*Ẏ⌈'⇩ḣh\h≠$h\s=∧;U56>7*Ẏ

Try it Online! Try it Online!

⌈'⇩:h\s=$h\h≠∧;U56>7*Ẏ⌈'⇩ḣh\h≠$h\s=∧;U56>7*Ẏ
⌈' ; Filter input, split on spaces, by:
 ⇩ḣ h\s= First character Push (input lowercased)([0], is[1:])
 's' h\h≠ Second character isn't `h`
 ⇩: $h\h≠∧ $h\s=∧  and secondfirst character (lowercased) isn'tisn 'h'`s`
 U Uniquify ^
 56> 1 if len(^) is 7 or more, otherwise 0
 7*Ẏ Multiply by 7 and slice [0:that]

Vyxal, 22 bytes

⌈'⇩:h\s=$h\h≠∧;U56>7*Ẏ

Try it Online!

⌈'⇩:h\s=$h\h≠∧;U56>7*Ẏ
⌈' ; Filter input, split on spaces, by:
  h\s= First character (lowercased) is 's'
 ⇩: $h\h≠∧ and second character (lowercased) isn't 'h'
 U Uniquify
 56> 1 if len(^) is 7 or more, otherwise 0
 7*Ẏ Multiply by 7 and slice [0:that]

Vyxal, 22 bytes

⌈'⇩ḣh\h≠$h\s=∧;U56>7*Ẏ

Try it Online!

⌈'⇩ḣh\h≠$h\s=∧;U56>7*Ẏ
⌈' ; Filter input, split on spaces, by:
 ⇩ḣ Push (input lowercased)([0], [1:])
  h\h≠ Second character isn't `h`
 $h\s=∧  and first character isn `s`
 U Uniquify ^
 56> 1 if len(^) is 7 or more, otherwise 0
 7*Ẏ Multiply by 7 and slice [0:that]
Source Link

Vyxal, 22 bytes

⌈'⇩:h\s=$h\h≠∧;U56>7*Ẏ

Try it Online!

⌈'⇩:h\s=$h\h≠∧;U56>7*Ẏ
⌈' ; Filter input, split on spaces, by:
 ⇩ h\s= First character (lowercased) is 's'
 ⇩: $h\h≠∧ and second character (lowercased) isn't 'h'
 U Uniquify
 56> 1 if len(^) is 7 or more, otherwise 0
 7*Ẏ Multiply by 7 and slice [0:that]

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