본문 바로가기

전체 글245

[정올] #501 출력 - 자가진단1(c++) https://jungol.co.kr/problem/501?cursor=eyJwcm9ibGVtc2V0IjoiMiIsImZpZWxkIjowLCJpZHgiOjF9 JUNGOL code_blocks 코드 보기 jungol.co.kr 답 #include using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout 2024. 2. 11.
[정올] #9001 출력 - 연습문제1(c++) https://jungol.co.kr/problem/9001?cursor=eyJwcm9ibGVtc2V0IjoiMiIsImZpZWxkIjowLCJpZHgiOjB9 JUNGOL code_blocks 코드 보기 jungol.co.kr 답 #include using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout 2024. 2. 10.
[프로그래머스] 문자열 돌리기(c언어) https://school.programmers.co.kr/learn/courses/30/lessons/181945 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #define LEN_INPUT 11 int main(void) { char s1[LEN_INPUT]; scanf("%s", s1); for(int i=0;i 2024. 2. 2.
[프로그래머스] 왼쪽 오른쪽(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181890 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #include using namespace std; vector solution(vector str_list) { vector answer; for(int i=0;i 2024. 2. 2.
[프로그래머스] 배열 만들기 5(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181912 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #include using namespace std; vector solution(vector intStrs, int k, int s, int l) { vector answer; int temp; for(int i=0;ik){ answer.push_back(temp); } } return answer; } 1. 변수 'answer': 조건의 맞는 정수들을 저장하기 위해 사용된.. 2024. 2. 1.
[프로그래머스] 커피 심부름(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181837 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #include using namespace std; int check(string order){ if(order=="americano"||order=="iceamericano"||order=="americanoice"||order=="hotamericano"||order=="americanohot"||order=="anything"){ return 4500; } else{ .. 2024. 2. 1.