题解 | #网购#
网购
http://www.nowcoder.com/practice/5d7dfd405e5f4e4fbfdff6862c46b751
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
double a = in.nextDouble();
int b = in.nextInt();
int c = in.nextInt();
int d = in.nextInt();
if(b==11&&c==11){
a = a0.7;
}if(b==12&&c==12){
a = a0.8;
}if(d==1){
a = a-50;
if(a<=0){
System.out.println("0.00");
}else
System.out.printf(String.format("%.2f",a));
}
if(d==0){
System.out.printf(String.format("%.2f",a));
}
}
}
if语句比循环运行时间短