You are viewing a single comment's thread. Return to all comments →
in R Could be:
stdin <- file('stdin') open(stdin) stats <- as.numeric(strsplit(trimws(readLines(stdin, n = 1, warn = FALSE), which = "right"), " ")[[1]]) less <- as.numeric(trimws(readLines(stdin, n = 1, warn = FALSE), which = "both")) between <- as.numeric(strsplit(trimws(readLines(stdin, n = 1, warn = FALSE), which = "right"), " ")[[1]]) mean <- stats[1] sd <- stats[2] cat(round(1 - pnorm(less, mean, sd, FALSE),3), fill=TRUE) cat(round(pnorm(between[2], mean, sd, TRUE) - pnorm(between[1], mean, sd, TRUE),3), fill=TRUE)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 5: Normal Distribution I
You are viewing a single comment's thread. Return to all comments →
in R Could be: