藍橋杯:歷年試題PREV-7— 連號區間數

符合條件的序列是連續遞增數列。因此查找所有滿足最大值最小值之差+1是數列元素個數的可能數列。 #include<stdio.h> #include<stdlib.h> int main(int argc,char **argv) { int cnt,i,j; scanf("%d",&cnt); int *array=(int*)calloc(cnt,sizeof(cnt)); for(i=
相關文章
相關標籤/搜索