lol-io

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i lol-io

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

4.45 kB

Total Files

7

Last publish

Collaborators

  • hapsidra