+ 1

Can someone tell me why is this code working perfectly on Visual Studio Code, but not here on SoloLearn Playground? Thanks!

https://code.sololearn.com/cyOiJyx3MWA5/?ref=app

19th Jan 2020, 2:41 PM
Marko Stankovic
Marko Stankovic - avatar
5 Respuestas
+ 14
The code seems perfect to me. Maybe you're finding some errors due to the input. In Sololearn, you need to input all the data at once. This tutorial may be helpful to understand handling of input : https://code.sololearn.com/WhiNb9BkJUVC/?ref=app
19th Jan 2020, 2:47 PM
Nova
Nova - avatar
+ 6
Input like this on two lines: 1 2 3 4 5 2
19th Jan 2020, 2:46 PM
Mihai Apostol
Mihai Apostol - avatar
+ 6
Here is some more information about input behavior of PlayGround: https://code.sololearn.com/c8pQgA9MTOj5/?ref=app
19th Jan 2020, 7:26 PM
Lothar
Lothar - avatar
+ 5
Thanks for a quick answers! I wasn't aware of input limitations
19th Jan 2020, 2:55 PM
Marko Stankovic
Marko Stankovic - avatar
+ 4
You used input() twice, and sololearn doesn't support multiple input() So to collect multiple inputs, split it into separate lines and press submit Example 1 2 6 3 #list 3 #key then submit
19th Jan 2020, 2:53 PM
Dlite
Dlite - avatar