include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, d;
scanf("%lf", &b);
int c;
c = b + 0.999999999;
if (0 <= c <= 20) {
d = (double)c * 1.68;
}
if (c > 20) {
d = (c - 20) * 1.98 + 20 * 1.68;
}
printf("%.2f", d);
return 0;
}
using namespace std;
int main() {
double a, b, d;
scanf("%lf", &b);
int c;
c = b + 0.999999999;
if (0 <= c <= 20) {
d = (double)c * 1.68;
}
if (c > 20) {
d = (c - 20) * 1.98 + 20 * 1.68;
}
printf("%.2f", d);
return 0;
}
登录后即可回复本帖,与出题人和同学一起讨论。
登录