Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Q11
- f <- function(x) log(x) / x^2
- n <- 1e7
- limit <- sum(f(x = 1:1e7))
- for (i in 1:n){
- if(sum(f(x = 1:i)) < limit & limit < sum(f(x = 1:i)) + 0.005){
- print(i)
- break
- }
- }
- # [1] 1685
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement