본문 바로가기

문제풀이20

[백준] javascript - 10171번 : 고양이 기본적인 문제는 문제풀이 없이 Solution만 작성되어 있습니다. Title 고양이 Description 아래 예제와 같이 고양이를 출력하시오. [ Example Output ] \ /\ ) ( ') ( / ) \(__)| How Can I Solved 문제 요구사항 정의 \ /\ ) ( ') ( / ) \(__)| 을 예제와 같은 모양으로 출력하라. 문제 접근 이 문제를 쉽게 해결하기 위해서는 특별한 문자에 대해서 인지하고 있어야 한다. 특별한 문자는 바로 backtick, grave accent 라는 이름을 가진 javascript 템플릿 리터럴이다. 모양은 아래와 같다. ` 위치는 아래와 같다. ( ESC키 아래를 확인해보자. ) ` 백틱 사용하기 백틱을 사용하여 출력할 문자들을 감싸준다. 코드를.. 2020. 7. 12.
[백준] javascript - 10718번 : We love kriii 기본적인 문제는 문제풀이 없이 Solution만 작성되어 있습니다. Title We love kriii Description ACM-ICPC 인터넷 예선, Regional, 그리고 World Finals까지 이미 2회씩 진출해버린 kriii는 미련을 버리지 못하고 왠지 모르게 올 해에도 파주 World Finals 준비 캠프에 참여했다. 대회를 뜰 줄 모르는 지박령 kriii를 위해서 격려의 문구를 출력해주자. [ Example Output ] 강한친구 대한육군 강한친구 대한육군 Solution const printTwice=(arg)=>{ console.log(arg) console.log(arg) } printTwice('강한친구 대한육군') 글 읽어주셔서 감사합니다. 보다 유익한 컨텐츠를 제작할 수.. 2020. 7. 12.
[CodeWars] javascript - 6kyu - Number Zoo Patrol 문제풀이 Title Number Zoo Patrol Description Background: You're working in a number zoo, and it seems that one of the numbers has gone missing! Zoo workers have no idea what number is missing, and are too incompetent to figure it out, so they're hiring you to do it for them. In case the zoo loses another number, they want your program to work regardless of how many numbers there are in total. Task: Write.. 2020. 5. 7.
[CodeWars] javascript - 6kyu - Difference of 2 문제풀이 Title Difference of 2 Description The objective is to return all pairs of integers from a given array of integers that have a difference of 2. The result array should be sorted in ascending order of values. Assume there are no duplicate integers in the array. The order of the integers in the input array should not matter. Examples [1, 2, 3, 4] should return [[1, 3], [2, 4]] [4, 1, 2, 3] should a.. 2020. 5. 6.