通过海量题库、编程比赛和实时排名,系统化提升您的编程能力。
下列函数的时间复杂度是( )。
int func(int n){ int i=0, sum=0; while(sum < n) sum += ++i; return i; }