Can I take Input from a file in codechef's question?

Can I take input from a file in codechef’s question by dynamically creating file and do all operations and give output???

1 Like


Please stick to the rules specified in the FAQ section.

You must use your normal methods of taking input and write output and you must not use files.

The online judge simply redirects the I/O to files internally, so all you must use is standard I/O techniques as raw_input() / print in Python and scanf() / printf() in C/C++…

Hope I could help,


I’m not sure if I understood you well.

You can have input in file.

But you do not wan’t (CodeChef do not want you to read some file), but you can use redirect as shown in FAQ - How should I test my program.