일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- nav태그
- git 버전관리
- calc()
- 할만한데?
- html 끝
- li 태그
- Pull
- 나도코딩
- 크롬웹
- 백준
- 코딩테스트
- 나도코딩 파이썬
- 생활코딩
- margin 0 auto
- border radius
- HTML
- 생활코딩 WEB2-JavaScript
- button:focus cursor: pointer; outline: none;
- 단계별로 풀어보기
- :root
- max-width
- 드림코딩
- 백준 자바스크립트
- error: ENOENT: no such file or directory
- 라매개발자
- box-sizing: border-box
- 노마드 코더
- 백준 정리
- git
- WEB2-JavaScript
- Today
- Total
목록분류 전체보기 (98)
코딩응애의 개발블로그
백준 1000번 오랜만에 풀다 보니 입력 코드 구현할 때 살짝 헷갈렸음 tlqk; 백준 10950번 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(__dirname + '/input.txt').toString().trim().split('\n'); const testcase = []; for (let i = 1; i +value)); } solution(+input[0],testcase); function solution(T,testcase) { // for(let i =0; i
#6.0 Quotes Math.random() -> 0 이상 1 미만의 구간에서 근사적으로 균일한(approximately uniform) 부동소숫점 의사난수를 반환한다. 여기에 곱하기 10을 해주면 0 이상 10 미만의 랜덤한 숫자가 나온다. 근데 숫자가 너무 난잡해서 보통 정수로 얻고 싶다면 Math.floor() : 소수점 이하를 버림한다. Math.ceil() : 소수점 이하를 올림한다. Math.round() : 소수점 이하를 반올림한다. 이러한 것들을 사용한다. 근데 예를 들어서 const animal = ["dog","cat","rabbit"] const animal = quotes[Math.floor(Math.random() * 3)]; 이런식으로 해도 좋지만 배열에 개수가 늘어나거나 줄어..
#5.0 Intervals intervals -> 매번 일어나야 하는 무언가를 뜻한다. 예를 들면 매초마다 무엇을 한다라는 말중 매초가 intervals를 뜻한다고 하는데 그 매 시간마다 함수를 실행하게 해주는 것이 바로 setInterval()이다. setInterval()은 2개의 인자를 받는데 첫번째는 실행하고자 하는 function 두번째는 호출되는 function의 시간간격을 몇ms로 할지 쓰면 된다. function sayHello() { console.log("hello"); } setInterval(sayHello, 5000); // 5000은 5000ms 즉 5초를 뜻한다. 5초마다 hello를 출력을 한다. #5.1 Timeouts and Dates setTimeout() -> func..
백준 2775번 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(__dirname + '/input.txt').toString().split('\n'); const T = Number(input.shift()); solution(T); function solution(T) { for (let i = 0; i Array(n + 1..
백준 1712번 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(__dirname + '/input.txt').toString().split('\n'); input = input[0].split(' ').map(value => +value); solution(input[0], input[1], input[2]); function solution(A, B, C) { if (C-B +value); solution(input[0], input[1], input[2]); function solution(A, B, V) { co..
#3.0 The Document Object HTML의 element 들은 JS를 통해 변경하고 읽을 수 있다. document -> HTML을 가리키는 객체이다. document가 JS 관점으로 HTML을 보여준다. 모든것들은 document로부터 시작한다. 왜나면 우리의 웹사이트를 의미하기 때문이다. #3.1 HTML in Javascript HTML에 항목들을 가지고 와서 JS를 통해 항목들을 변경할 수 있다. document.getElementById() -> 괄호안에 id를 적으면 예를 들어서 html에 id가 title인 element가 있다고 가정하고 document.getElementById("title") 이렇게 적으면 id로 element를 가져올 수 있는것이다. const test =..
백준 2525번 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(__dirname + '/input.txt').toString().split('\n'); const [inputA, inputB] = input[0].split(' ').map(value => +value); const inputC = input[1].split('\n').map(value => +value); solution(inputA, inputB, +inputC); function solution(A, B, C) { let cMin = (B + C)..
복습 겸해서 1단계부터 다시 풀어보면서 정리 할만한거는 정리하는 식으로 할거임 백준 1000번 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(__dirname + '/input.txt').toString().split('\n'); input = input[0].split(' ').map(value => +value); solution(input[0],input[1]); function solution(A,B) { console.log(A+B); } 처음에 이 문제를 풀었을때는 입력받는 문장을 input = input[..