코딩공부 221

[프로그래머스]Lv.0 부분 문자열 이어 붙여 문자열 만들기 C#

https://school.programmers.co.kr/learn/courses/30/lessons/181911 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; public class Solution { public string solution(string[] my_strings, int[,] parts) { string answer = ""; for (int i = 0; i < parts.GetLength(0); i++) { int s = parts[i, 0]; int e = parts[i, 1]; answer += ..

[프로그래머스]Lv.0 배열 만들기 5 C#

https://school.programmers.co.kr/learn/courses/30/lessons/181912?language=csharp 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; using System.Collections.Generic; public class Solution { public int[] solution(string[] intStrs, int k, int s, int l) { List answer = new List(); for (int i = 0; i < intStrs.Length; i++)..

[프로그래머스]Lv.0 문자열 여러 번 뒤집기 C# (Aarray.Reverse)

https://school.programmers.co.kr/learn/courses/30/lessons/181913 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; public class Solution { public string solution(string my_string, int[,] queries) { char[] answer = my_string.ToCharArray(); for (int i = 0; i < queries.GetLength(0); i++) { int startIdx = queries[i, 0]; ..

[프로그래머스]Lv.0 9로 나눈 나머지 C# (string 배열 형변환 없이)

https://school.programmers.co.kr/learn/courses/30/lessons/181914 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; using System.Collections; using System.Collections.Generic; using System.Linq; public class Solution { public int solution(string number) { int answer = 0; for (int i = 0; i < number.Length; i++) answer ..

[프로그래머스]Lv.0 글자 이어 붙여 문자열 만들기 C#

https://school.programmers.co.kr/learn/courses/30/lessons/181915?language=csharp 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; public class Solution { public string solution(string my_string, int[] index_list) { string answer = ""; for (int i = 0; i < index_list.Length; i++) answer += my_string[index_list[i]]; re..

[프로그래머스]Lv.0 주사위 게임3 C#

https://school.programmers.co.kr/learn/courses/30/lessons/181916?language=csharp 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; using System.Collections; using System.Collections.Generic; using System.Linq; public class Solution { public int solution(int a, int b, int c, int d) { int answer = 0; List list = new Li..

[프로그래머스]Lv.0 간단한 논리 연산 C#

https://school.programmers.co.kr/learn/courses/30/lessons/181917 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; public class Solution { public bool solution(bool x1, bool x2, bool x3, bool x4) { bool answer = true; bool x = x1 || x2; bool y = x3 || x4; answer = x && y; return answer; } }

[프로그래머스]Lv.0 배열 만들기 4 C#

https://school.programmers.co.kr/learn/courses/30/lessons/181918 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; using System.Collections; using System.Collections.Generic; using System.Linq; public class Solution { public int[] solution(int[] arr) { List stk = new List(); int i = 0; int cnt = 0; int lstCnt = 0; wh..

[프로그래머스]Lv.0 콜라츠 수열 만들기 C#

https://school.programmers.co.kr/learn/courses/30/lessons/181919 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; using System.Collections.Generic; public class Solution { public int[] solution(int n) { List answer = new List(); answer.Add(n); while (n != 1) { if (n % 2 == 0) n = n / 2; else n = 3 * n + 1; answer.Ad..

[프로그래머스]Lv.0 카운트 업 C#

https://school.programmers.co.kr/learn/courses/30/lessons/181920 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; using System.Collections.Generic; public class Solution { public int[] solution(int start, int end) { List answer = new List(); for (int i = start; i