1 条题解

  • 0
    @ 2024-5-17 20:50:37

    Java :

    import java.util.Scanner;
    
    /**
     * @Author:shisan
     * @Date:2023/10/24 19:31
     */
    public class Main {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int n = sc.nextInt();
            String c = sc.next();
            int res = 8;
            if (n > 1000) {
                n -= 1000;
                res += n / 500 * 4;
                if (n % 500 != 0) res += 4;
            }
            if (c.equals("y")) res += 5;
            System.out.println(res);
        }
    }
    
    • 1

    信息

    ID
    5663
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者