728x90
https://school.programmers.co.kr/learn/courses/30/lessons/120908
📝 나의 풀이
using System;
public class Solution {
public int solution(string str1, string str2) {
int answer = 0;
if(str1.Contains(str2)==true){
answer = 1;
} else {
answer = 2;
}
return answer;
}
}
728x90
'코딩테스트 > [C#] 프로그래머스' 카테고리의 다른 글
[프로그래머스 | Lv.0] 옷가게 할인 받기 (0) | 2023.08.13 |
---|---|
[프로그래머스 | Lv.0] 중앙값 구하기 (0) | 2023.08.13 |
[프로그래머스 | Lv.0] 삼각형의 완성조건 (1) (0) | 2023.08.13 |
[프로그래머스 | Lv.0] 두 수의 곱 (0) | 2023.08.13 |
[프로그래머스 | Lv.0] 모음 제거 (0) | 2023.08.13 |