728x90
https://school.programmers.co.kr/learn/courses/30/lessons/181840
📝 나의 풀이
using System;
public class Solution {
public int solution(int[] num_list, int n) {
int answer = 0;
for(int i=0; i<num_list.Length; i++){
if(num_list[i]==n){
answer=1;
break;
}
}
return answer;
}
}
728x90
'코딩테스트 > [C#] 프로그래머스' 카테고리의 다른 글
[프로그래머스 | C# | Lv.0] 문자열의 뒤의 n글자 (0) | 2023.08.28 |
---|---|
[프로그래머스 | C# | Lv.0] 카운트 다운 (0) | 2023.08.28 |
[프로그래머스 | C# | Lv.0] 부분 문자열인지 확인하기 (0) | 2023.08.28 |
[프로그래머스 | C# | Lv.0] 공백으로 구분하기 1 (0) | 2023.08.28 |
[프로그래머스 | C# | Lv.0] 배열 비교하기 (1) | 2023.08.27 |