#include <stdio.h>
#include <stdlib.h> int main()
{
int r,m,y,i;
scanf("%d %d %d",&r,&m,&y);
double ans=m*((double)r/+);
for(i=;i<y;i++)
{
ans*=((double)r/+);
}
printf("%d",(int)ans);
return ;
}
用pow好像更好
#include <stdio.h>
#include <stdlib.h> int main()
{
int r,m,y,i;
scanf("%d %d %d",&r,&m,&y);
double ans=m*((double)r/+);
for(i=;i<y;i++)
{
ans*=((double)r/+);
}
printf("%d",(int)ans);
return ;
}
用pow好像更好