TIL

3/11일자 TIL

오딘.L.스트레인지 2026. 3. 11. 20:07

코드카타-문자열 나누기

 

#include <string>
using namespace std;

int solution(string s) {
    int count = 0;

    char x = 0;          
    int same = 0;        
    int diff = 0;        

    for (int i = 0; i < (int)s.size(); i++) {

        if (same==0 && diff==0) {
            x = s[i];
        }

        if (s[i] == x) {
            same++;
        } 
        else {
            diff++;
        }

        if (same == diff) {
            count++;
            same = 0;
            diff = 0;
        }
    }

    if (same + diff > 0) {
        count++;
    }

    return count;
}

 

 

 

특강-Claude Code

Claude Code에서 사용가능한 모델은

  1. Opus 4.6
  2. Sonnet 4.6
  3. Haiku 4.5

가 있는데, 저걸 비주얼 스튜디오 코드와 연동시키려면 유료 구독이 필요하다.

그렇게 연동하면,

깃 배쉬까지 사용하는 AI 코드 생성기가 나온다.

'TIL' 카테고리의 다른 글

3월 13일자 TIL  (1) 2026.03.13
3/12일자 TIL  (0) 2026.03.12
3/10일자 TIL  (0) 2026.03.10
3/09일자 TIL  (0) 2026.03.09
3/06일자 TIL  (0) 2026.03.06