Skip to main content
added 43 characters in body
Source Link
lyxal
  • 35.6k
  • 2
  • 69
  • 148

Vyxal, 14 1212 10 bytes

?lƛṫ$∑=;AlṠṪ?nȯ⁼)ṅ‹ 

Try it Online!Try it Online!

Man this new "lambda to newline" thing is cool.

-2 thanks to @emanresuA

Explained

?lƛṫ$∑=;AlṠṪ?nȯ⁼)ṅ‹   )ṅ  # Get the first positive integer n where: ?lƛ  ;A # all overlapping# windows of sizethe sums of n:all ?l ṫ$∑  # overlapping windows haveof the suminput of everylength itemn  but the last  = # #with the tail removed  equal to the last item  # exactly equals   ?nȯ # decrement n input[n:] 

Vyxal, 14 12 bytes

?lƛṫ$∑=;A)ṅ‹ 

Try it Online!

Man this new "lambda to newline" thing is cool

Explained

?lƛṫ$∑=;A)ṅ‹   )ṅ # Get the first positive integer n where: ?lƛ ;A # all overlapping windows of size of n: ṫ$∑ # have the sum of every item but the last  = # equal to the last item   # decrement n 

Vyxal, 14 12 10 bytes

?lṠṪ?nȯ⁼) 

Try it Online!

Man this new "lambda to newline" thing is cool.

-2 thanks to @emanresuA

Explained

?lṠṪ?nȯ⁼) )ṅ  # Get the first positive integer n where:  # the sums of all ?l   # overlapping windows of the input of length n   # with the tail removed   # exactly equals  ?nȯ #  input[n:] 
added 266 characters in body
Source Link
lyxal
  • 35.6k
  • 2
  • 69
  • 148

Vyxal, 1414 12 bytes

λ?$lƛṫ$∑=;A;ṅ‹lƛṫ$∑=;A)ṅ‹ 

Try it Online!Try it Online!

Man this new "lambda to newline" thing is cool

Explained

λ?$lƛṫ$∑=;A;ṅ‹lƛṫ$∑=;A)ṅ‹ λ  ;ṅ)ṅ # Get the first positive integer n where:  ?$lƛ ;A # all overlapping windows of size of n:   ṫ$∑ # have the sum of every item but the last   = # equal to the last item   ‹ # decrement n 

Vyxal, 14 bytes

λ?$lƛṫ$∑=;A;ṅ‹ 

Try it Online!

Explained

λ?$lƛṫ$∑=;A;ṅ‹ λ  ;ṅ # Get the first positive integer n where:  ?$lƛ ;A # all overlapping windows of size of n:   ṫ$∑ # have the sum of every item but the last   = # equal to the last item   ‹ # decrement n 

Vyxal, 14 12 bytes

?lƛṫ$∑=;A)ṅ‹ 

Try it Online!

Man this new "lambda to newline" thing is cool

Explained

?lƛṫ$∑=;A)ṅ‹ )ṅ # Get the first positive integer n where: ? ;A # all overlapping windows of size of n: ṫ$∑ # have the sum of every item but the last = # equal to the last item ‹ # decrement n 
Source Link
lyxal
  • 35.6k
  • 2
  • 69
  • 148

Vyxal, 14 bytes

λ?$lƛṫ$∑=;A;ṅ‹ 

Try it Online!

Explained

λ?$lƛṫ$∑=;A;ṅ‹ λ ;ṅ # Get the first positive integer n where: ?$lƛ ;A # all overlapping windows of size of n: ṫ$∑ # have the sum of every item but the last = # equal to the last item ‹ # decrement n