HDOJ 1994 利息计算(水题)

HDACM 1994

import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while(t-->0){
            double y = sc.nextDouble();
            int q = sc.nextInt();
            double e = sc.nextDouble();
            double f = sc.nextDouble();
            double g = sc.nextDouble();
            System.out.printf("%.1f",y*(1+e/100*q/365)*(1+g/100));
            System.out.println();
            System.out.printf("%.1f",y*(1+f/100*(q+365)/365));
            System.out.println();
        }
        sc.close();
    }
}

你可能感兴趣的:(1.ACM,ACM)