ํฐ์คํ ๋ฆฌ ๋ทฐ
๐ฉ๐ป๐ป ๋ฌธ์
โ๐ป ํ์ด
๐จ Go
// https://www.acmicpc.net/problem/1543
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
func main() {
reader := bufio.NewReader(os.Stdin)
writer := bufio.NewWriter(os.Stdout)
defer writer.Flush()
var document, word string
document, _ = reader.ReadString('\n')
document = strings.ReplaceAll(document, "\n", "")
word, _ = reader.ReadString('\n')
word = strings.ReplaceAll(word, "\n", "")
fmt.Println(strings.Count(document, word))
}
๐จ Python3
# https://www.acmicpc.net/problem/1543
import sys
if __name__ == "__main__":
document = sys.stdin.readline().rstrip()
word = sys.stdin.readline().rstrip()
print(document.count(word))
728x90
'dev > algorithm' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
BOJ / 1822๋ฒ / ์ฐจ์งํฉ [Go][Python3] (0) | 2021.02.13 |
---|---|
BOJ / 2670๋ฒ / ์ฐ์๋ถ๋ถ์ต๋๊ณฑ [Go][Python3] (0) | 2021.02.12 |
BOJ / 1485๋ฒ / ์ ์ฌ๊ฐํ [Go][Python3] (0) | 2021.02.10 |
BOJ / 2217๋ฒ / ๋กํ [Go][Python3] (0) | 2021.02.09 |
BOJ / 4659๋ฒ / ๋น๋ฐ๋ฒํธ ๋ฐ์ํ๊ธฐ [Go][Python3] (0) | 2021.02.08 |
๋๊ธ
๊ธ ๋ณด๊ดํจ
์ต๊ทผ์ ๋ฌ๋ฆฐ ๋๊ธ
TAG
- baekjoon
- ํด์๋งต
- ๋งฅ๋ถํ๋ก
- BFS
- AWS
- ํ
- ๋ฐฑ์ค
- Golang
- ๋ธ๋ฃจํธํฌ์ค
- ํ๋ก์ด๋์์ฌ
- ์๋ฐ
- ๋งฅ๋ถ ์ ๊ทธ๋ ์ด๋
- python3
- ์ด๋ถํ์
- dfs
- java
- go
- ๋ถํ ์ ๋ณต
- dp
- ์๊ฐ๊ต์ฒด
- ์๊ณ ๋ฆฌ์ฆ
- ๋งฅ๋ถ
- ๋ฐ๋
- Macbook pro 2012 mid 13
- MongoDB
- Algorithm
- BOJ
- ๋ชฝ๊ณ ๋๋น
- ballet
- ์คํ
- Total
- Today
- Yesterday