R solving hackerrank challenge

后端 未结 5 898
挽巷
挽巷 2020-12-31 18:55

I would like to solve the challenge. The language of my preference is R. I am not sure how to receive input. On hackerrank coding window it says that

\"# En         


        
5条回答
  •  忘掉有多难
    2020-12-31 19:32

    A very handy one-liner to read in from standard input is the scan function, for instance:

    text <- scan(file = 'stdin', what = 'character', sep = '\r')
    

提交回复
热议问题