问题 单项选择题

下面程序段的时间复杂度为( ) s=0; for(i=1;i<n;i++) for(j=1;j<i;j++) s+=i*j;

A.O(1)

B.O(log2

C.O(

D.O(n3)

答案

参考答案:D

选择题
选择题