umilove98의 블로그

백준 17496 Java 본문

algorithm/백준

백준 17496 Java

umilove98 2021. 7. 18. 13:12
반응형

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Q17496 {

	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String s = bf.readLine();
		StringTokenizer st = new StringTokenizer(s);
		int n = Integer.parseInt(st.nextToken());
		int t = Integer.parseInt(st.nextToken());
		int c = Integer.parseInt(st.nextToken());
		int p = Integer.parseInt(st.nextToken());
		
		System.out.println((n-1)/t*c*p);

	}

}
반응형

'algorithm > 백준' 카테고리의 다른 글

백준 20254 Java  (0) 2021.07.18
백준 18301 Java  (0) 2021.07.18
백준 Java 제출시 컴파일 에러  (0) 2021.07.18
백준 17256 Java  (0) 2021.07.18
백준 16430 Java  (0) 2021.07.18