Waste less time on Facebook — follow Brilliant.
×

Factorial

How many ZEROES (NOT trailing zeroes) are there at \(2015!\)?

Note by Bryan Lee Shi Yang
2 years, 1 month ago

No vote yet
1 vote

Comments

Sort by:

Top Newest

This seems to be a number theory problem, but here's my python solution for this.

1
2
3
from math import factorial
print(str(factorial(2015)).count('0'))
#Returns 1037, time taken=6ms
Pranjal Jain · 2 years, 1 month ago

Log in to reply

@Pranjal Jain Wheyy....you know python too? I thought you used C++ for CS! Krishna Ar · 2 years, 1 month ago

Log in to reply

@Krishna Ar Yeah I learnt python about a month ago due to lack of required data types in C++. Also, I am posting solutions in python now-a-days. Pranjal Jain · 2 years, 1 month ago

Log in to reply

@Pranjal Jain Amazing. Krishna Ar · 2 years, 1 month ago

Log in to reply

@Pranjal Jain Can I call this "Python Jugaad" :P ? Karthik Venkata · 2 years, 1 month ago

Log in to reply

@Karthik Venkata Lol sure Pranjal Jain · 2 years, 1 month ago

Log in to reply

@Pranjal Jain Haha maybe "Python Pranjal". Bryan Lee Shi Yang · 2 years, 1 month ago

Log in to reply

@Bryan Lee Shi Yang I do not like pythonic answers, I like traditional mathematical thinking and logical reasoning. Any body has a mathematical answer? Swapnil Das · 2 years ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...