题解 | #网购#
网购
https://www.nowcoder.com/practice/5d7dfd405e5f4e4fbfdff6862c46b751
#include <stdlib.h> int main() { double a = 0.0; int b, c, d; b = c = d = 0; scanf("%lf %d %d %d", &a, &b, &c, &d); if (b == 11 && c == 11) { a *= 0.7; } else if (b == 12 && c == 12) { a *= 0.8; } a -= d * 50; if (a <= 0) a = 0; printf("%.2lf", a); return 0; }