#include
int main()
{
double km,money=0;
int min;
scanf("%lf%d",&km,&min);
if(0
money = 10;
}
else if(3
money = 10+2*(km-3);
}
else if(km>10)
{
money = 24+3*(km-10);
}
money += min/5*2;
printf("%.0f",money);
return 0;
}
(要引入math.h)
#include
#include
int main()
{
float r,n;
scanf("%f%f",&r,&n);
printf("%.2f",pow((1+r),n));
return 0;
}
#include
#include
int main()
{
float d,p,r;
scanf("%f%f%f",&d,&p,&r);
printf("%.2f",(log (p) - log (p - d * r))/log(r+1));
return 0;
}
#include
int main()
{
char c1,c2,c3,c4,c5;
scanf("%c %c %c %c %c",&c1,&c2,&c3,&c4,&c5);
c1 += 4;
c2 += 4;
c3 += 4;
c4 += 4;
c5 += 4;
printf("%c%c%c%c%c",c1,c2,c3,c4,c5);
return 0;
}
#include
int main()
{
int m,s;
double t,c;
scanf("%d%d",&m,&s);
t = m + (double)s/60;
if(0<=t && t<=10)
{
c = 100 - 5*t;
}
else if(10
c = 50 - (t - 10);
}
else if(30
c = 30 - (t - 30)/2;
}
else if(50
c = 20;
}
printf("%.1f",c);
return 0;
}
#include
int main()
{
char c1,c2,c3,c4,c5;
int j = 0;
scanf("%c %c %c %c %c",&c1,&c2,&c3,&c4,&c5);
char arr[5] = {c1,c2,c3,c4,c5};
for(int i = 0;i < 5;i++)
{
if(arr[i] == 'a' || arr[i] == 'A')
{
j++;
}
}
printf("%d",j);
return 0;
}
#include
int main()
{
float t,A,B;
scanf("%f",&t);
A = 0.6*t;
B = 50 + 0.4*t;
printf("%.2f\n%.2f\n",A,B);
if(A {
printf("A");
}
else
{
printf("B");
}
return 0;
}