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