Basically, for me as a newbie on Competitive Programming was difficult to find the way you are supposed to enter the input of the test cases.
That lead me to find little about how to do so, seeming that everyones supouse that you know, but yes, we don't, so here are how you can expect
input from the judge (the program that executes your script passing it one or more test cases) for all languages allowed.
Last active
March 12, 2026 17:36
-
-
Save u-m-i/6d0824d973c6acd92b16d6cf7d8f79e3 to your computer and use it in GitHub Desktop.
Codeforce's way to access input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main(void){ | |
| /* Simplest */ | |
| int n; | |
| scanf("%d", &n); | |
| /* Whole line */ | |
| char input[100]; // It can be a larger number | |
| fgets(input, sizeof(input), stdin); | |
| /* Large inputs */ | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Common JS */ | |
| const fs = require("fs"); | |
| const input = fs.readFileSync(0, "utf8"); | |
| /* Parse the input */ | |
| /* Simple method */ | |
| const args = input.replace("\r\n", "").split(" "); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment