Created
April 26, 2020 04:43
-
-
Save gauravkoradiya/a944619847ffd500dba1636b65bfe4d9 to your computer and use it in GitHub Desktop.
Codechef_DSA01 - Factorial - FCTRL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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