← Back to List

17496번: 스타후르츠 ↗

Solutions

Java 8
303 B | 303 chars
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int T = sc.nextInt();
        int C = sc.nextInt();
        int P = sc.nextInt();
        System.out.println(((N-1)/T) * C*P );
    }
}