Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Reading from stdin
- # 5
- # 4.2 5.4 1.2 5.3 8.9
- stdin <- file('stdin')
- lines <- readLines(stdin)
- N <- as.numeric(lines[1])
- stopifnot(N == as.integer(N))
- chunks <- strsplit(lines[2], split='\\s+')[[1]]
- values <- as.numeric(chunks)
- close(stdin)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement