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

