#include<stdio.h>
#include<math.h>
int main()
{
double wei, total = 0;
scanf("%lf", &wei);
if (wei > 30)printf("Fail");
else {
if (wei <= 10) total = wei * 0.80;
else if (wei <= 20) total = 8.00 + (wei - 10) * 0.75;
else total = 15.50 + (wei - 20) * 0.70;
total += 0.2;
printf("%.2lf", total);
}
return 0;
}
1010. 邮寄包裹 (Standard IO)
最新推荐文章于 2024-02-02 14:55:42 发布