분류 전체보기

작금昨今

작(昨)과 금(今)의 균열 위에서, 그대는 버틴다. 하지만, 기저에 맺힌 눈물을 머금으며, 그만 마주하고 만다. 작(昨)의 그대와 말이다. 주저앉아, 자괴로 얼룩진 외침을 토해낸다. 회한이 서린 메아리만이 이 동혈에 남는다. 그렇게 주저앉은 채로, 기다린다. 기다리고, 기다리고, 또 기다린다. 바람, 금(今)의 바람을 말이다. 그 바람, 이 인내가, 확신의 초탄이 되기를 빌며, 나는 버틴다.

JavaScript/React

2023.09.13 react 공부 정리

- react에서 props들은 top-down 방향으로 단방향 전달만이 가능하다. 예를 들어, Apps.js에서 아래와 같은 코드가 존재하면 name과 age라는 props들은 해당 App.js로 import된 components으로만 전달이 가능하다. function App() { return } 즉, App.js is the parent and Something.js is the child, and the props can be read in the Something.js component. 전달된 props들은 immutable하고, 오직 parent component에서 전달해주는 것에 rely 한다.

JavaScript/React

2023.08.30 react 공부 정리

JSX is a syntax expression for JS which allows us to treat HTML as expressions; they can be stored in variables, objects, arrays, etc. indes.js works as the entry point of our application 'react-dom'에서 import된 method들은 DOM 과 interact한다. 'react'에서 import된 method들은 DOM과 interact하지 않고, react의 하위구성이 아닌 것들과는 interact하지 않는다. 즉, DOM은 React에 쓰이지만, 그렇다고 해서 React의 일부분인 것은 아니다. 비-react applications에도 쓰이기 때..

Python/문제풀이

python_백준BOJ_#2309_일곱 난쟁이_review

접근 방법 9명 모두의 키의 합에서 100을 빼서 excess를 구한다. 그 다음, for문을 이용하여 9명 중 2명의 조합이 excess와 같은지 확인하고, 같을 시 print한다. 입력 코드 dwarf = [] for i in range(9): dwarf.append(int(input().rstrip())) dwarf.sort() excess = sum(dwarf) - 100 for j in range(8): for k in range(j+1,9): #확통에서 9C2하는 것과 같은 방식 if dwarf[j] + dwarf[k] == excess: del dwarf[j] del dwarf[k-1] #line12에서 item 하나를 del 했으므로, k가 아닌 k-1을 del해야함 for l in dwa..

Python/문제풀이

python_백준BOJ_#2116_주사위 쌓기_review

접근 방법 Only one combination of the orientation exists for every orientation of the first block. Thus, for each of the six first-block-orientation, sum up the max value of each "floor", then find the ultimate max value amongst the six sums. 최종 입력 코드 import sys n = int(sys.stdin.readline()) tower = [] down_up_dic = {0:5, 1:3, 2:4, 3:1, 4:2, 5:0} for i in range(n): tower.append(list(map(int, input()..

Python/문제풀이

python_백준BOJ_#2596_비밀편지_review

일정 단위마다 끊어야하는 숫자 입력이 들어올 떄 사용 가능한 방법 n = int(input()) s = input() s_list = [] for i in range(0, n*6, 6): s_list.append(s[i:i+6]) for문 내의 변수를 이용하여 indexing 가능함 for i in s_list: for j in num: for k in range(6): if i[k]==j[k]: when the required "index" is given as a str, instead of a integer or slices s_list.index(i or word[num.index(j)] 출처: 한국정보올림피아드 2004 초등부 1번

selfish_penguin
'분류 전체보기' 카테고리의 글 목록