令t=1/2x+1,dt=0.5dx
原式f(t)dx=2f(t)dt
得出积分为2F(x)+C
1
#include
int main()
{
double x;
while(scanf("%lf",&x) == 1) {
if(x == 0) printf("0\n");
else if(x>0) printf("%lf\n",2*x+1);
else printf("%lf\n",1/x);
}
return 0;
}
2
#include
int s[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
int main()
{
int y,m,d,i,sum;
while(scanf("%d %d %d",&y,&m,&d) == 3) {
sum = 0;
for(i = 1;i
if((y%400 == 0 ||(y%100 !=0 && y%4==0)) && m>2) sum ++;
printf("%d\n",sum);
}
return 0;
}
3
#include
int f(int n)
{
if(n == 1) return 1;
else return n*f(n-1);
}
int main()
{
printf("%d\n",f(9)-f(7)+f(5)+f(3));
return 0;
}
∫f(x/2+1)dx=2∫f(x/2+1)d(x/2+1)
=2F(x/2+1)+C