题解 | #网购#
网购
https://www.nowcoder.com/practice/5d7dfd405e5f4e4fbfdff6862c46b751
#include <stdio.h> int main(){ double r = 0.0; int m = 0; int d = 0; int q = 0; scanf("%lf %d %d %d", &r, &m, &d, &q); if(m==11&&d==11){ r = r * 0.7 - 50.0 * q; }else if(m==12&&d==12){ r = r * 0.8 - 50.0 * q; } if(r < 0){ printf("0.00\n"); }else{ printf("%.2lf\n", r); } return 0; }