Skip to main content
added 17 characters in body
Source Link
Underslash
  • 1.7k
  • 1
  • 7
  • 14

Vyxal s, 5 bytes

ɾǐƛ5O  # main program
ɾ      # range over input
 ǐ     # take the prime factors of each number
  ƛ5O  # for each value, count the 5s
-s     # sum top of stack

Try it Online!

Vyxal, 3 bytes

¡5Ǒ

This one uses the same approach as caird coinheringaahing's answer

Try it Online!

Vyxal l, 3 bytes (for inputs > 4)

¡Ġt

Approach by Lyxal, takes the factorial of the input, groups by consecutive, then gets the length of the tail using the -l flag.

Try it Online!

Vyxal s, 5 bytes

ɾǐƛ5O  # main program
ɾ      # range over input
 ǐ     # take the prime factors of each number
  ƛ5O  # for each value, count the 5s
-s     # sum top of stack

Try it Online!

Vyxal, 3 bytes

¡5Ǒ

This one uses the same approach as caird coinheringaahing's answer

Try it Online!

Vyxal l, 3 bytes

¡Ġt

Approach by Lyxal, takes the factorial of the input, groups by consecutive, then gets the length of the tail using the -l flag.

Try it Online!

Vyxal s, 5 bytes

ɾǐƛ5O  # main program
ɾ      # range over input
 ǐ     # take the prime factors of each number
  ƛ5O  # for each value, count the 5s
-s     # sum top of stack

Try it Online!

Vyxal, 3 bytes

¡5Ǒ

This one uses the same approach as caird coinheringaahing's answer

Try it Online!

Vyxal l, 3 bytes (for inputs > 4)

¡Ġt

Approach by Lyxal, takes the factorial of the input, groups by consecutive, then gets the length of the tail using the -l flag.

Try it Online!

added 313 characters in body
Source Link
Underslash
  • 1.7k
  • 1
  • 7
  • 14

Vyxal s, 5 bytes

ɾǐƛ5O  # main program
ɾ      # range over input
 ǐ     # take the prime factors of each number
  ƛ5O  # for each value, count the 5s
-s     # sum top of stack

Try it Online!

Vyxal, 3 bytes

¡5Ǒ

This one uses the same approach as caird coinheringaahing's answer

Try it Online!

Vyxal l, 3 bytes

¡Ġt

Approach by Lyxal, takes the factorial of the input, groups by consecutive, then gets the length of the tail using the -l flag.

Try it Online!

Vyxal s, 5 bytes

ɾǐƛ5O  # main program
ɾ      # range over input
 ǐ     # take the prime factors of each number
  ƛ5O  # for each value, count the 5s
-s     # sum top of stack

Try it Online!

Vyxal, 3 bytes

¡5Ǒ

This one uses the same approach as caird coinheringaahing's answer

Try it Online!

Vyxal s, 5 bytes

ɾǐƛ5O  # main program
ɾ      # range over input
 ǐ     # take the prime factors of each number
  ƛ5O  # for each value, count the 5s
-s     # sum top of stack

Try it Online!

Vyxal, 3 bytes

¡5Ǒ

This one uses the same approach as caird coinheringaahing's answer

Try it Online!

Vyxal l, 3 bytes

¡Ġt

Approach by Lyxal, takes the factorial of the input, groups by consecutive, then gets the length of the tail using the -l flag.

Try it Online!

Source Link
Underslash
  • 1.7k
  • 1
  • 7
  • 14

Vyxal s, 5 bytes

ɾǐƛ5O  # main program
ɾ      # range over input
 ǐ     # take the prime factors of each number
  ƛ5O  # for each value, count the 5s
-s     # sum top of stack

Try it Online!

Vyxal, 3 bytes

¡5Ǒ

This one uses the same approach as caird coinheringaahing's answer

Try it Online!