목록프로그래머스 정복 (19)
Programmer:)
프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr Select 연습. private string Caculation(string s) { string answer = ""; List list_num = s.Split(' ').Select(x => int.Parse(x)).OrderBy(x => x).ToList(); answer = String.Format("{0} {1}", list_num.First(), list_num.Last()); return answer; }

문제 : https://school.programmers.co.kr/learn/courses/30/lessons/120956 내가 제출한 코드 : using System; using System.Collections.Generic; using System.Linq; public class Solution { public int solution(string[] babbling) { int answer = 0; string blank = "0"; List mainList = new List { "aya", "ye", "woo", "ma" }; List inputList = babbling.ToList(); List search = new List(); //인풋값중에 발음할 수 있는 단어와 완전히 일치하는 것..

문제 : https://school.programmers.co.kr/learn/courses/30/lessons/131130#qna 내가 제출한 코드 : using System; using System.Collections.Generic; using System.Linq; public class Solution { public int solution(int[] cards) { int answer = 0; List indexList = new List(); for (int i = 1; i

문제 : https://school.programmers.co.kr/learn/courses/30/lessons/135807 내가 제출한 코드 : using System; using System.Collections.Generic; using System.Linq; public class Solution { public int solution(int[] arrayA, int[] arrayB) { int answer = 0; var a = from f in arrayA.Distinct() orderby f ascending select f; var b = from f in arrayB.Distinct() orderby f ascending select f; List A = a.ToList(); List B..

문제 : https://school.programmers.co.kr/learn/courses/30/lessons/135808 내가 제출한 코드 : using System; using System.Linq; public class Solution { public int solution(int k, int m, int[] score) { int answer = 0; int makeBoxCount = score.Length / m; var s = from f in score orderby f descending select f; var listScore = s.ToList(); for (int i = 1; i

문제 : https://school.programmers.co.kr/learn/courses/30/lessons/86491 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 내가 제출한 코드 : using System; using System.Linq; using System.Collections.Generic; public class Solution { public int solution(int[,] sizes) { int w, h; List sample = new List(); List sample2 = new List(); for (int i = 0; ..
문제 https://programmers.co.kr/learn/courses/30/lessons/42748 코딩테스트 연습 - K번째수 [1, 5, 2, 6, 3, 7, 4] [[2, 5, 3], [4, 4, 1], [1, 7, 3]] [5, 6, 3] programmers.co.kr 내가 제출한 코드 using System; using System.Collections.Generic; public class Solution { public int[] solution(int[] array, int[,] commands) { List temp = new List(); List answer = new List(); for (int i = 0; i < commands.GetLongLength(0); i++) ..
문제 https://programmers.co.kr/learn/courses/30/lessons/76501 코딩테스트 연습 - 음양 더하기 어떤 정수들이 있습니다. 이 정수들의 절댓값을 차례대로 담은 정수 배열 absolutes와 이 정수들의 부호를 차례대로 담은 불리언 배열 signs가 매개변수로 주어집니다. 실제 정수들의 합을 구하여 re programmers.co.kr using System; public class Solution { public int solution(int[] absolutes, bool[] signs) { int answer = 0; for(int i = 0; i < absolutes.Length; i++) { if(signs[i] == false) absolutes[i] *..