분류 전체보기245 [프로그래머스] 조건 문자열(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181934 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #include using namespace std; int solution(string ineq, string eq, int n, int m) { if(ineq==">"&&eq=="="&&n>=m||ineq==" 2023. 12. 27. [프로그래머스] 홀짝에 따라 다른 값 반환하기(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181935 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #include using namespace std; int solution(int n) { int ans=0; if(n%2!=0){ for(int i=1;i 2023. 12. 27. [프로그래머스] 공배수(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181936 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #include using namespace std; int solution(int number, int n, int m) { if(number%n==0&&number%m==0){ return 1; } else{ return 0; } } number이 n과 m으로 나누었을때 모두 나머지가 0이라면 number은 n,m의 공배수 이다. 끝 2023. 12. 27. [프로그래머스] 문자열 겹쳐쓰기(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181943 답 #include #include using namespace std; string solution(string my_string, string overwrite_string, int s) { for(int i=0;i 2023. 12. 26. [프로그래머스] 문자열 섞기(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181942 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include using namespace std; string solution(string str1, string str2) { string ans=""; for(int i=0;i 2023. 12. 26. [프로그래머스] 문자 리스트를 문자열로 변환하기(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181941 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #include using namespace std; string solution(vector arr) { string ans; for(int i=0;i 2023. 12. 26. 이전 1 ··· 28 29 30 31 32 33 34 ··· 41 다음