웅재의 코딩세상
[프로그래머스] 정수 찾기 본문
- 풀이
#include <string>
#include <vector>
using namespace std;
int solution(vector<int> num_list, int n) {
for(int i=0; i<num_list.size(); i++){
if(num_list[i] == n) return 1;
}
return 0;
}
반응형
'코딩테스트 > 프로그래머스 - LV 0' 카테고리의 다른 글
[프로그래머스] n보다 커질 때까지 더하기 (0) | 2024.01.25 |
---|---|
[프로그래머스] 접미사인지 확인하기 (0) | 2024.01.25 |
[프로그래머스] 조건에 맞게 수열 변환하기 1 (0) | 2024.01.25 |
[프로그래머스] 수 조작하기 1 (1) | 2024.01.25 |
[프로그래머스] 정수 부분 (0) | 2024.01.25 |