코딩공부 221

[프로그래머스]Lv.0 첫 번째로 나오는 음수 C# (linq 포함)

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

[프로그래머스]Lv.0 리스트 자르기C# (linq 포함)

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

[프로그래머스]Lv.0 가까운 1 찾기 C# (linq 포함)

https://school.programmers.co.kr/learn/courses/30/lessons/181898 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드1 using System; public class Solution { public int solution(int[] arr, int idx) { while (arr.Length>idx) { if (arr[idx] == 1) return idx; idx++; } return -1; int index = 0; return Array.FindIndex(arr,x => index++ >=idx..

[프로그래머스]Lv.0 카운트 다운C# (linq 포함)

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

[프로그래머스]Lv.0 글자 지우기 C# (linq 포함)

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

[프로그래머스]Lv.0 배열 만들기 1 C# (for 곱셈 linq 포함)

https://school.programmers.co.kr/learn/courses/30/lessons/181901 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드1 using System; using System.Collections.Generic; using System.Linq; public class Solution { public int[] solution(int n, int k) { return Enumerable.Range(1,n).Where(w=>w % k == 0).ToArray(); } } 소스코드2 using System; us..

[프로그래머스]Lv.0 문자 개수 세기 C# (char - char = int)

https://school.programmers.co.kr/learn/courses/30/lessons/181902 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; public class Solution { public int[] solution(string my_string) { int[] answer = new int[52]; foreach (var c in my_string) { if(c >= 'A' && c = 'a' && c

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

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

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

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

[프로그래머스]Lv.0 문자열의 뒤의 n글자 C#

https://school.programmers.co.kr/learn/courses/30/lessons/181910 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 소스코드 using System; public class Solution { public string solution(string my_string, int n) { return my_string.Substring(my_string.Length - n, n); } }