lol-io
v1.1.0
Published
<a href="codefores.ru">Codeforces</a> uses d8 for testing javascript code. d8 provides IO functions, but if you don't want install d8 and you want testing your solutions using node.js then you can use this module<br><br> If you want try d8 you can downlo
Downloads
9
Maintainers
Readme
lol-io
Codeforces uses d8 for testing javascript code. d8 provides IO functions, but if you don't want install d8 and you want testing your solutions using node.js then you can use this module If you want try d8 you can download it compiled for windows here Post about js on codeforces http://codeforces.com/blog/entry/10024 Discussing on codeforces http://codeforces.com/blog/entry/57807
When you use this library, your code is valid for submitting to codeforces
Example
var print = this.print || require('lol-io').print
var write = this.write || require('lol-io').write
var readline = this.readline || require('lol-io').readline
// a + b
const s = readline().split(' ')
print(+s[0] + +s[1]);
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js.
Installation is done using the
npm install
command:
$ npm install lol-io
Functions
- write - write line into output.txt, example write('hello', 'world')
- print - write line into output.txt, automatically prints new line, example print('hello', 'world')
- readline - read line from input.txt, example var line = readline(), if no more lines return undefined
Features
- automatic creation of input.txt and output.txt, if does not exist