728x90
https://school.programmers.co.kr/learn/courses/30/lessons/181879
📝 나의 풀이
using System;
public class Solution {
public int solution(int[] num_list) {
int answer = 1;
for(int i=0; i<num_list.Length; i++){
if(11<=num_list.Length){
answer +=num_list[i];
} else {
answer *=num_list[i];
}
}
if(11<=num_list.Length) answer -=1;
return answer;
}
}
728x90
'코딩테스트 > [C#] 프로그래머스' 카테고리의 다른 글
[프로그래머스 | C# | Lv.0] n의 배수 (0) | 2023.08.16 |
---|---|
[프로그래머스 | C# | Lv.0] n보다 커질 때까지 더하기 (0) | 2023.08.15 |
[프로그래머스 | C# | Lv.0] 문자열 곱하기 (0) | 2023.08.14 |
[프로그래머스 | Lv.0] 수 조작하기 1 (0) | 2023.08.13 |
[프로그래머스 | Lv.0] 첫 번째로 나오는 음수 (0) | 2023.08.13 |