This code takes 2500 numbers from one line in clojure.
(import 'java.util.Scanner)
(let [s (new Scanner *in*)]
(for [i (range 2500)] (.nextInt s)))
But clojure takes only 4096 symbols.
I tried change scanner to buffer, but it doesn't work.
(import 'java.io.BufferReader)
(def r (new BufferedReader *in*))
(.read r)
It takes only 4096 symbols.
How to read more than 4096 symbols from on line from STDIN?
In addition to the above, here are some other answers that may help:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.