Here are two algorithms (pseudo-code):

```
Alg1(n)
1.    int x = n
2.    int a = 0
3.    while(x > 1) do
3.1.    for i = 1 to x do
3.1.1       a = a + 1
3.2     x = x - n/5

Alg2(n)
1.    int x = n
2.    int a = 0
3.    while(x > 1) do
3.1.    for i = 1 to x do
3.1.1       a = a + 1
3.2     x = x/5

```

The difference is on line 3.2.

Time complexity:

* Alg1: c + c +n\*n\*2c = 2c + 2cn² = 2c(n² + 1) = O(n²)
* Alg2: c + c +n\*n\*2c = 2c + 2cn² = 2c(n² + 1) = O(n²)

I wanted to know if the calculation is correct.

Thanks!