御影百合絵からのお願い
const lines = require('fs').readFileSync('/dev/stdin', 'utf8').toString().trim().split('\n');
console.log(Array.from(lines, Number).reduce((a, b) => a + b));
春日みちるからのSOS
const lines = require('fs').readFileSync('/dev/stdin', 'utf8').toString().trim().split('\n');
console.log(lines[0].includes('help') ? 'SOS' : lines[0]);
園田冴絵からの依頼
const cols = require('fs').readFileSync('/dev/stdin', 'utf8').toString().trim().split('\n')[0].split(' ');
const calc = (p) => ({'-' : (a, b) => a - b, '+': (a, b) => a + b})[p];
console.log(calc(cols[2])(parseInt(cols[0],10), parseInt(cols[1],10)));
芦屋川雛乃からのヘルプ依頼
const lines = require('fs').readFileSync('/dev/stdin', 'utf8').toString().trim().split('\n');
const Codec = ((t, c) => ({encode:i => t[i], decode:s => t.indexOf(s)}[c]))(lines[0].split(' '), lines[1]);
console.log(Array.from(lines[2], Codec).join(''));
桂乃梨子とピンチを乗り越えろ
const lines = require('fs').readFileSync('/dev/stdin', 'utf8').toString().trim().split('\n').map(v => Array.from(v.split(' '), Number));
console.log(lines[2].map(r => lines[1].map(c => r + c).join(' ')).join('\n'));
水無瀬朋の一大事
const lines = require('fs').readFileSync('/dev/stdin', 'utf8').toString().trim().split('\n');
const split = (ls, s, e) => ls.slice(s, e).map(l => Array.from(l.split(' '), Number));
const calc = (p, a) => (p[0] * a) - (p[2] * Math.floor(a / p[1]));
console.log(split(lines, +lines[0] + 2, lines.length).map(c => calc(split(lines, 1, +lines[0] + 1)[c[0] - 1], c[1])).join('\n'));