반응형

전체 글 223

[프로그래머스 C#] 모의고사

https://programmers.co.kr/learn/courses/30/lessons/42840 코딩테스트 연습 - 모의고사 수포자는 수학을 포기한 사람의 준말입니다. 수포자 삼인방은 모의고사에 수학 문제를 전부 찍으려 합니다. 수포자는 1번 문제부터 마지막 문제까지 다음과 같이 찍습니다. 1번 수포자가 찍는 programmers.co.kr using System; using System.Collections.Generic; using System.Linq; public class Solution { public int[] solution(int[] answers) { List answer = new List(); int[] people = new int[3] { 0, 0, 0 }; int[] pe..

오늘의 영어

We have to take another way. - 우리 다른 길로 가야해. -> Okay. Don't worry. I know a shortcut~ I'll go ASAP! => I know the shortcut. We'll be there in a minute. (금방 도착할거야!) Could you drop me off at the subway station? - 지하철역에서 내려주실래요? -> Sure. We are arriving in 3 minutes. or => We'll be there in three mins. How much is the fare? - 요금이 얼마에요? -> It's $11.30. By the way, Do you have a smalll bill? I don't ..

영어공부 2021.09.06

[프로그래머스 C#] 체육복

https://programmers.co.kr/learn/courses/30/lessons/42862 코딩테스트 연습 - 체육복 점심시간에 도둑이 들어, 일부 학생이 체육복을 도난당했습니다. 다행히 여벌 체육복이 있는 학생이 이들에게 체육복을 빌려주려 합니다. 학생들의 번호는 체격 순으로 매겨져 있어, 바로 앞번 programmers.co.kr using System; using System.Collections.Generic; using System.Linq; public class Solution { public int solution(int n, int[] lost, int[] reserve) { int answer = 0; List _lost = lost.ToList(); List _reserve..

[프로그래머스 C#] 2주차 상호 평가

https://programmers.co.kr/learn/courses/30/lessons/83201 코딩테스트 연습 - 2주차 [[100,90,98,88,65],[50,45,99,85,77],[47,88,95,80,67],[61,57,100,80,65],[24,90,94,75,65]] "FBABD" [[70,49,90],[68,50,38],[73,31,100]] "CFD" programmers.co.kr using System; using System.Collections.Generic; using System.Linq; public class Solution { string Grade(int avr) { string grade = ""; switch (avr) { case 9 : grade = "A"..

[프로그래머스 C#] 약수의 개수와 덧셈

https://programmers.co.kr/learn/courses/30/lessons/77884 코딩테스트 연습 - 약수의 개수와 덧셈 두 정수 left와 right가 매개변수로 주어집니다. left부터 right까지의 모든 수들 중에서, 약수의 개수가 짝수인 수는 더하고, 약수의 개수가 홀수인 수는 뺀 수를 return 하도록 solution 함수를 완성해주 programmers.co.kr using System; public class Solution { bool Divisor(int num) { int temp = 0; for (int i = 0; ++i

[프로그래머스 C#] 3진법 뒤집기

https://programmers.co.kr/learn/courses/30/lessons/68935 코딩테스트 연습 - 3진법 뒤집기 자연수 n이 매개변수로 주어집니다. n을 3진법 상에서 앞뒤로 뒤집은 후, 이를 다시 10진법으로 표현한 수를 return 하도록 solution 함수를 완성해주세요. 제한사항 n은 1 이상 100,000,000 이하인 자연수 programmers.co.kr using System; using System.Linq; using System.Collections.Generic; public class Solution { public int solution(int n) { int answer = 0; string temp = ""; while(n != 0) { temp +=..

오늘의 영어

on this Tuesday== X => on Tue OR => last / this / next + Tuesday I don't know why I am still busy even though my company released a game this Tues. - 나는 모르겠어 왜 내가 아직도 바쁜지, 회사에서 게임을 이번 화요일에 출시했음에도 불구하고 It's same old, same old. - 항상 똑같아~ (매일매일이 똑같아서 지루하고 그런 느낌을 말할 때) * => same old same old Did you get your hair dyed? - 머리 염색했어? I get my hair dyed. - 염색했엉 ​Congratulations on something! = Congrats! ..

영어공부 2021.09.04

[프로그래머스 C#] 예산

https://programmers.co.kr/learn/courses/30/lessons/12982 코딩테스트 연습 - 예산 S사에서는 각 부서에 필요한 물품을 지원해 주기 위해 부서별로 물품을 구매하는데 필요한 금액을 조사했습니다. 그러나, 전체 예산이 정해져 있기 때문에 모든 부서의 물품을 구매해 줄 수는 programmers.co.kr using System; public class Solution { public int solution(int[] d, int budget) { int answer = 0; Array.Sort(d); foreach(int item in d) if ((budget -= item) >= 0) ++answer; return answer; } }

[프로그래머스 C#] 1주차 부족한 금액 계산하기

https://programmers.co.kr/learn/courses/30/lessons/82612 코딩테스트 연습 - 1주차 새로 생긴 놀이기구는 인기가 매우 많아 줄이 끊이질 않습니다. 이 놀이기구의 원래 이용료는 price원 인데, 놀이기구를 N 번 째 이용한다면 원래 이용료의 N배를 받기로 하였습니다. 즉, 처음 이 programmers.co.kr class Solution { public long solution(int price, int money, int count) { long answer = 0; long sum = 0; for (long i = 0; ++i sum ? 0 : sum - money; return answer; } }

반응형