阿抽提成的那题不知道错了哪里

public class Main {
public static void main(String[] args) throws java.io.UnsupportedEncodingException {
    PrintStream ps = new PrintStream(System.out, true, "UTF-8");
    Scanner in = new Scanner(System.in);
    int x = in.nextInt();
    if(x<=500){ps.print(x);}else
    if(x>500 && x<=3600){ps.print((int)(x-(x-500)*0.03));}else
    if(x>3600 && x<=14400){ps.print(((int)(x-93)-(x-3600)*(0.1)));}else
    if(x>14400 && x<=30000){ps.print((int)((x-1172)-(x-14400)*(0.2)));}else
    if(x>30000){ps.print((int)((x-4293)-(x-30000)*0.5));}
    }
}

1 条评论

  • @ 2019-04-15 18:06:25

    呃。。。这相当于是直接问我答案吗。。。

    星期三会讲解哈~

  • 1