![프로그래머스 Lv.0 양꼬치](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbIIZQz%2FbtsCc445ls5%2FEhIeIbKpQaZzfjy5rZYHOK%2Fimg.png)
프로그래머스 Lv.0 양꼬치개발자가 되기까지 (2023.08.16~2024.04.15)/[Algorithm] Programmers ver.Java2023. 12. 18. 00:52
Table of Contents
<Solution>
class Solution {
public int solution(int n, int k) {
int answer = 0;
if ( n / 10 > 0) {
int service = n / 10;
answer = (n * 12000) + ((k-service) * 2000);
} else {
answer = (n * 12000) + (k * 2000);
}
return answer;
}
}
728x90
@rlozlr :: 얼렁뚱땅 개발자
얼렁뚱땅 주니어 개발자
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!