+ 1
Why only streamlined input?
Why does the code playground only have the ability to prompt for streamlined input, and not for live console input?
2 ответов
+ 25
online compilers run whole bunch of code at once, making "live input" will require sending data to and from client with every Console.ReadLine();
which would slow down all process (execution of program). especially if ≈10000 codes run simultaneously
+ 4
It's most likely not an issue of resources (taking input and prompting for it is not resource-intensive), it's just difficult to detect that the program is waiting for input. You'll find that any online compiler that allows for user input does the same thing-- You provide all input before running the program.
As far as I can tell, SoloLearn looks for code that appears to be reading input, even if you don't use it. For example,
if(false) std::cin << x;
will show the input prompt, even though it's never called.