下面代码的时间复杂度是 O(2^n)。 int cnt = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) { cnt++; } }