Skip to content

Instantly share code, notes, and snippets.

@gauravkoradiya
Created April 26, 2020 04:43
Show Gist options
  • Save gauravkoradiya/a944619847ffd500dba1636b65bfe4d9 to your computer and use it in GitHub Desktop.
Save gauravkoradiya/a944619847ffd500dba1636b65bfe4d9 to your computer and use it in GitHub Desktop.
Codechef_DSA01 - Factorial - FCTRL
# https://www.codechef.com/LRNDSA01/problems/FCTRL
def solution(a):
if a < 5:
return 0
else:
b = a // 5
return b + solution(b)
def main():
for T in range(int(input())):
number = int(input())
print(solution(number))
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment