跪求指点,超时!!
查看原帖
跪求指点,超时!!
583794
Wyadjj楼主2021/12/14 17:14
#include<stdio.h>
int main()
{
	int shu1,shu2;
	int m(int x);
	int zhong=0;
	scanf("%d",&shu1);
	shu2=shu1/2;
	zhong=shu2;
    for( ;shu2>0;shu2--)
    {
        zhong+=m(shu2);
	}	
	zhong++;
	printf("%d",zhong);
 } 
 int m(int x)
 {
 	int zhong=0;
 	x=x/2;
    zhong+=x;
 	for( ;x>1;x--)
        {
        	zhong+=m(x);
		}
		return zhong;
 }
2021/12/14 17:14
加载中...