목록프로그래머스 정복/C# (10)
Programmer:)
문제 https://programmers.co.kr/learn/courses/30/lessons/81301?language=csharp 코딩테스트 연습 - 숫자 문자열과 영단어 네오와 프로도가 숫자놀이를 하고 있습니다. 네오가 프로도에게 숫자를 건넬 때 일부 자릿수를 영단어로 바꾼 카드를 건네주면 프로도는 원래 숫자를 찾는 게임입니다. 다음은 숫자의 일부 자 programmers.co.kr 아스키코드 활용 using System; public class Solution { string[] m_arrayAlphabetNum = new string[10] { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; pu..
문제 https://programmers.co.kr/learn/courses/30/lessons/77484 코딩테스트 연습 - 로또의 최고 순위와 최저 순위 로또 6/45(이하 '로또'로 표기)는 1부터 45까지의 숫자 중 6개를 찍어서 맞히는 대표적인 복권입니다. 아래는 로또의 순위를 정하는 방식입니다. 1 순위 당첨 내용 1 6개 번호가 모두 일치 2 5개 번호 programmers.co.kr 성능 비교해보려고 for, foreach 로 풀어봤다. using System; public class Solution { public int[] solution(int[] lottos, int[] win_nums) { int sameValue = 0; int zeroValue = 0; int[] rank = ..