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