Код: Выделить всё
int k = 0;
for (int a = n; a >= 1; a /= 2)
for (int b = a; b >= 1; b--)
k++;
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79702662/what-is-the-time-complexity-of-the-following-algorithm[/url]
Код: Выделить всё
int k = 0;
for (int a = n; a >= 1; a /= 2)
for (int b = a; b >= 1; b--)
k++;
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79702662/what-is-the-time-complexity-of-the-following-algorithm[/url]