일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- 노트북램교체
- ADT
- 자바스크립트
- Unity
- GMK67
- 삼성노트북
- 코드잇
- 연결리스트
- 기계식키보드
- 긱바
- 노트북SSD교체
- M1W
- 코딩공부
- unityC#
- 추상적 자료형
- 브론즈
- 몬스긱
- 삼성노트북하판
- solved.ac
- LinkedList
- 백준
- 코테준비
- 코테
- YAML
- 오늘도코드잇
- 코드잇TIL
- 시간복잡도
- JavaScript
- JS
- 자료구조
- Today
- Total
목록Computer Programming (14)
SKYLIGHT STUDIO
문제학생들은 3주가 지난 기념으로 매점에서 1월 1일이 지나 싸게 파는 폭죽을 사서 터뜨리고 있다.폭죽쇼를 하는 동안 N명의 학생들이 폭죽을 터뜨린다. 그리고 이 N명의 학생은 각각 일정한 주기로 폭죽을 터뜨린다. 물론 이 주기는 학생들마다 같을 수도, 다를 수도 있다. 그리고 우리는 초 단위로 관찰을 하고, 폭죽 역시 초 단위로 터진다.폭죽쇼가 끝날 때까지 얼마나 많은 시간동안 밤하늘에 폭죽이 터지는 것을 볼 수 있는지 궁금해 하는 조교를 도와주자.입력첫 줄에 폭죽을 터뜨리는 학생의 수 N(1 ≤ N ≤ 100)과 폭죽쇼가 끝나는 시간 C(1 ≤ C ≤ 2,000,000)가 주어진다. 그 다음 N개의 줄에는 학생들이 폭죽을 터뜨리는 주기가 한 줄에 하나씩 주어진다. 주기는 1보다 크거나 같고, C보다 ..
전자 제품에는 저항이 들어간다. 저항은 색 3개를 이용해서 그 저항이 몇 옴인지 나타낸다. 처음 색 2개는 저항의 값이고, 마지막 색은 곱해야 하는 값이다. 저항의 값은 다음 표를 이용해서 구한다.예를 들어, 저항의 색이 yellow, violet, red였다면 저항의 값은 4,700이 된다.입력첫째 줄에 첫 번째 색, 둘째 줄에 두 번째 색, 셋째 줄에 세 번째 색이 주어진다. 위의 표에 있는 색만 입력으로 주어진다.출력입력으로 주어진 저항의 저항값을 계산하여 첫째 줄에 출력한다. black01brown110red2100orange31,000yellow410,000green5100,000blue61,000,000violet710,000,000grey8100,000,000white91,000,000,00..
문제사탕 박사 고창영은 사탕 공장을 그만 두고 초등학교 선생님으로 취직했다.오늘은 창영이네 반 학생들과 소풍을 가는 날이다. N명의 학생은 모두 가방에 사탕을 가득 담아왔다.그런데, 사탕을 많이 가져온 학생들이 사탕을 적게 가져온 학생들을 놀리기 시작했다.창영이는 "얘들아~ 그러면 안되지ㅜㅜ 사탕을 모두 여기에 가져와보렴. 선생님이 공평하게 나눠줄게"창영이는 모든 학생들이 같은 사탕을 가지게 하려고 한다.이것이 가능한 일일까?입력첫째 줄에 테스트 케이스의 개수 T가 주어진다. 각 테스트 케이스는 빈 줄로 구분되어 있고, 다음과 같이 구성되어 있다.테스트 케이스의 첫째 줄에 학생의 수 N이 주어진다. 다음 N개의 줄에는 각 학생들이 가져온 사탕의 수가 주어진다.N은 100,000보다 작거나 같은 자연수이고..
다 알고 있겠지만 C++는 일반적인 방법으로 동적 배열을 사용할 수 없다. 유니티가 쓰기 쉬운 이유 중 하나.C++에서는 std::vector을 사용해야 하며, 이 배열을 사용해야 비로소 크기를 동적으로 줄이거나 늘릴 수 있다. 일반적인 포인터를 이용한 동적 배열과는 조금 결이 다르며, 일단 이 특징부터 살펴볼 것이다. #include using namespace std;vector v;v.push_back(10); // 벡터에 10을 추가v.push_back(20); 일반적으로 이렇게 사용한다. 1. 템플릿 클래스vector v1; // 정수형 벡터vector v2; // 문자열형 벡터vector v3; // 실수형 벡터 어떤 자료형이든 사용할 수 있는 템플릿 클래스. 2. 자..