ํฐ์คํ ๋ฆฌ ๋ทฐ
๐ฉ๐ป๐ป ๋ฌธ์
โ๐ป ํ์ด
๐จ 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
- ์ด๋ถํ์
- MongoDB
- AWS
- ๋งฅ๋ถ
- ๋ถํ ์ ๋ณต
- ๋งฅ๋ถ ์ ๊ทธ๋ ์ด๋
- Macbook pro 2012 mid 13
- java
- ์คํ
- go
- Algorithm
- ๋ฐ๋
- dfs
- dp
- BOJ
- baekjoon
- ํด์๋งต
- ๋ชฝ๊ณ ๋๋น
- python3
- ์๊ณ ๋ฆฌ์ฆ
- ์๋ฐ
- Golang
- BFS
- ballet
- ๋ฐฑ์ค
- ๋ธ๋ฃจํธํฌ์ค
- ํ
- ํ๋ก์ด๋์์ฌ
- ๋งฅ๋ถํ๋ก
- ์๊ฐ๊ต์ฒด
- Total
- Today
- Yesterday