Skip to content

Instantly share code, notes, and snippets.

@utkuboduroglu
Created February 21, 2021 09:33
Show Gist options
  • Save utkuboduroglu/05735f262bb85abb3e4cd70030876c99 to your computer and use it in GitHub Desktop.
Save utkuboduroglu/05735f262bb85abb3e4cd70030876c99 to your computer and use it in GitHub Desktop.
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