-
class Solution { public int solution(int price) { int answer = 0; if (price >= 500000) { // 50만원보다 클때 price = (int) (price * 0.8); // 20퍼 할인 answer = price; // 20퍼 할인 가격 = answer } else if (price >= 300000) { price = (int) (price * 0.9); answer = price; } else if (price >= 100000) { price = (int) (price * 0.95); answer = price; } else { answer = price; } return answer; } }