Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のように計算する必要があります: n+1/n * n '''' nlist <- c(2,5,8,10,50,100,500, 1000)
#I tried a for loop- it seems I am making a mistake for (n in nlist) { k <- 1:n z1 <- 1/(k+1) z <- sum(z1) *(n + 1)/n print(z) readline() }
'''''''