import java.util.Scanner;
public class Main {
public static void main (String [] args) {
Scanner sc = new Scanner(System.in);
double s = sc.nextDouble();
double e = 0;
if (s < 15) {
e = 4 * s / 3;
} else {
e = 2.5 * s - 17.5;
}
System.out.printf("%.2f", e);
}
}
7-11 分段计算居民水费 (10 分)
最新推荐文章于 2024-08-15 14:47:41 发布