본문 바로가기
Beakjoon&프로그래머스/Java

[백준/Java] 17496번 스타후르츠

by 현장 2022. 4. 14.

-Code

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int t = scanner.nextInt();
        int c = scanner.nextInt();
        int p = scanner.nextInt();

        System.out.println((n - 1) / t * c * p);
    }
}