ghostb123
(SEHOON)
1
func main() {
sc := bufio.NewScanner(os.Stdin)
buf := make([]byte, 0, 10241024)
sc.Buffer(buf, 10241024)
sc.Split(bufio.ScanWords)
sc.Scan()
temp := sc.Text()
fmt.Println(len(temp))
}
I input string with length 100000 but this code returns 9998
Please help
NobbZ
(Norbert Melzer)
2
That might be your operating system that flushes, try reading repeatedly until you got everything you want to have.
1 Like
system
(system)
Closed
3
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.