Created
February 21, 2021 09:33
-
-
Save utkuboduroglu/05735f262bb85abb3e4cd70030876c99 to your computer and use it in GitHub Desktop.
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
import numpy as np | |
# Z(N) defined for base 10, which has divisors | |
# 2 and 5 | |
def Z(number): | |
factor = 5 | |
if number < factor: | |
return 0 | |
rem = np.int(np.floor(number/factor)) | |
return rem + rFactors(rem, factor) | |
# get number of arguments | |
T = int(input()) | |
# calculate Z(N_i) for all i in T | |
for i in range(T): | |
N_i = int(input()) | |
print(Z(N_i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment