#include <stdio.h>
int main(){
    float price = 0;
    int month, day, hasP = 0;
    scanf("%f %d %d %d", &price, &month, &day, &hasP);
    float cut = 0;
    if(month == 11 && day == 11){
        cut = 0.7;
    }else if(month == 12 && day == 12){
        cut = 0.8;
    }
    float pay = price*cut - 50*hasP;
    if(pay <= 0){
        printf("0.00");
    }else{
        printf("%.2f", pay);
    }
}
2020-11-05
在牛客打卡8天,今天学习:刷题 5 道/代码提交 6 次
全部评论

相关推荐

头像
05-12 09:14
点赞 评论 收藏
转发
2 收藏 评论
分享
牛客网
牛客企业服务