R solving hackerrank challenge

后端 未结 5 871
挽巷
挽巷 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条回答
  •  萌比男神i
    2020-12-31 19:16

    Look at the "warmup".

    data <- suppressWarnings(read.table("stdin", sep=" "));
    

    Alternatively you can use

    data <- suppressWarnings(readLines(file("stdin")))
    

    Also Refer this page in hackerrank

提交回复
热议问题