본문 바로가기
C++

[프로그래머스] 문자열안에 문자열

by 띰쥬 2025. 9. 4.
728x90
반응형
SMALL

#include <string>
#include <vector>

using namespace std;

int solution(string str1, string str2) {
    int answer = 0;

    return str1.find(str2) != string::npos ? 1:2;
}

728x90
반응형
LIST

댓글