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

[백준/Java] 24568번 Cupcake Party

by 현장 2022. 4. 15.

-Code

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int r = sc.nextInt();
        int s = sc.nextInt();

        System.out.println(r * 8 + s * 3 - 28);
    }
}