코딩테스트

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 배열 만들기 1

문제 코드 #include using namespace std; vector solution(int n, int k) { vector answer; for(int i = 1; i

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 문자 개수 세기

문제 코드 #include using namespace std; vector solution(string my_string) { vector answer(52,0); for(const char c : my_string) { if((int)c = (int)'a') { answer[(int)(c-71)]++; } } return answer; }

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 qr code

문제 코드 #include using namespace std; string solution(int q, int r, string code) { string answer = ""; for(int i = 0; i

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 세로 읽기

문제 코드 #include using namespace std; string solution(string my_string, int m, int c) { string answer = ""; for(int i = 0; i

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 접두사인지 확인하기

문제 코드 int solution(string my_string, string is_prefix) { int answer = 0; string s; if (my_string.length() >= is_prefix.length()) { s.assign(my_string.begin(), my_string.begin() + is_prefix.length()); answer = (s == is_prefix) ? 1 : 0; } else { answer = 0; } return answer; // return (my_string.find(is_prefix) == 0); }

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 문자열의 앞의 n글자

문제 코드 string solution(string my_string, int n) { string answer = ""; for(int i = 0; i

mane
'코딩테스트' 카테고리의 글 목록 (10 Page)