(1).백준 7790번 Joke는 Joke가 몇번 들어가는지 묻는 간단한 문제로
뭔가 직접 카운팅 하기보다 joke라는 글자로 잘라서 배열의 길이를 측정하는 방식으로 처리했다.
const input = `In this joke problem all you have
to do is to find how many times
word "joke" can be found in the
input file as substring
Input file can contain any number
of lines.
And you have to find word "joke"
in all text.
But if one line contains beginning
of word and the
other line contains ending of word
-- you don’t have to count it
For example, jo
ke is not counted.
But joke is counted`.split('joke')
console.log(input.length - 1)'회고' 카테고리의 다른 글
| [개발일지] - 966(주말) (0) | 2026.03.09 |
|---|---|
| [개발일지] - 965(주말) (0) | 2026.03.08 |
| [개발일지] - 963 (0) | 2026.03.06 |
| [개발일지] - 962 (0) | 2026.03.05 |
| [개발일지] - 961 (0) | 2026.03.04 |