#include <stdio.h>
int main() {
int N, X, Y;
printf("請輸入 N、X、Y (0 < Y): "); scanf("%d %d %d", &N
, &X
, &Y
);
int temperature = 20;
// 使用循環計算最高溫度
for (int i = 0; i < N / 2; i++) {
temperature += X;
temperature -= Y;
if (temperature < 20) {
temperature = 20;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGludCBOLCBYLCBZOwogICAgcHJpbnRmKCLoq4vovLjlhaUgTuOAgVjjgIFZICgwIDwgWSk6ICIpOwogICAgc2NhbmYoIiVkICVkICVkIiwgJk4sICZYLCAmWSk7CgogICAgaW50IHRlbXBlcmF0dXJlID0gMjA7CgogICAgLy8g5L2/55So5b6q55Kw6KiI566X5pyA6auY5rqr5bqmCiAgICBmb3IgKGludCBpID0gMDsgaSA8IE4gLyAyOyBpKyspIHsKICAgICAgICB0ZW1wZXJhdHVyZSArPSBYOwogICAgICAgIHRlbXBlcmF0dXJlIC09IFk7CiAgICAgICAgaWYgKHRlbXBlcmF0dXJlIDwgMjApIHsKICAgICAgICAgICAgdGVtcGVyYXR1cmUgPSAyMDsKICAgICAgICB9CiAgICB9CgogICAgcHJpbnRmKCIlZFxuIiwgdGVtcGVyYXR1cmUpOwoKICAgIHJldHVybiAwOwp9Cg==