Task #4

mail@pastecode.io avatar
unknown
python
3 years ago
240 B
14
Indexable
Never
def f(n):
    calls = 0
    for i in range(n+1):
         for j in range(i):
             for k in range(i):
                 calls += 1
    return calls


n = 10
print(f'calls: {f(n)}\n'
      f'n^2: {n * n}\n'
      f'n^3: {n * n * n/3}')