题解 | #牛牛的快递#
牛牛的快递
http://www.nowcoder.com/practice/41b42e7b3c3547e3acf8e90c41d98270
#include <stdio.h>
int main()
{
float a,i;
char b;
int sum,count;
scanf("%f %c",&a,&b);
for(i=a;i>0;i--)
{
count++;
}
if(b=='y')
{
sum=(count-3)+25;
}
else if(b=='n')
sum=(count-3)+20;
printf("%d",sum);
return 0;
int main()
{
float a,i;
char b;
int sum,count;
scanf("%f %c",&a,&b);
for(i=a;i>0;i--)
{
count++;
}
if(b=='y')
{
sum=(count-3)+25;
}
else if(b=='n')
sum=(count-3)+20;
printf("%d",sum);
return 0;
}