전체 글245 [프로그래머스] 간단한 식 계산하기(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181865 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #include using namespace std; string calculate(string a1,string b1,char op){ int a=stoi(a1); int b=stoi(b1); if(op=='+'){ return to_string(a+b); } else if(op=='-'){ return to_string(a-b); } else if(op=='*'){ ret.. 2024. 1. 23. [프로그래머스] 세 개의 구분자(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181862 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include using namespace std; vector solution(string myStr) { vector answer; string temp; for(int i=0;i 2024. 1. 13. [프로그래머스] 공백으로 구분하기 2(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181868 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #include using namespace std; vector solution(string my_string) { vector answer; string temp=""; for(int i=0;i 2024. 1. 13. [프로그래머스] 두 수의 합(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181846 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include using namespace std; string solution(string a, string b) { string answer; int carry=0; int temp; if(a.size()>b.size()){ b.insert(0,a.size()-b.size(),'0'); } else if(a.size()=0;i--){ temp=(a[i]-'0')+(b[i]-'0')+ca.. 2024. 1. 13. [프로그래머스] 정수를 나선형으로 배치하기(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181832 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #include using namespace std; vector solution(int n) { vector answer(n,vector(n,0)); int count=1; int m=n; int x=0,y=-1; while (m>0) { for (int i=0;i 2024. 1. 13. [프로그래머스] 그림 확대(c++) https://school.programmers.co.kr/learn/courses/30/lessons/181836 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 답 #include #include using namespace std; vector solution(vector picture, int k) { vector answer; string temp; for(int i=0;i 2024. 1. 12. 이전 1 ··· 26 27 28 29 30 31 32 ··· 41 다음