mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2024-11-09 22:08:58 +01:00
19 lines
430 B
JavaScript
19 lines
430 B
JavaScript
import readline from 'node:readline'
|
|
|
|
import { getMaximumFrequencyDeviation } from './getMaximumFrequencyDeviation.js'
|
|
|
|
const input = []
|
|
const readlineInterface = readline.createInterface({
|
|
input: process.stdin,
|
|
output: process.stdout
|
|
})
|
|
readlineInterface.on('line', (value) => {
|
|
input.push(value)
|
|
})
|
|
|
|
const solution = () => {
|
|
console.log(getMaximumFrequencyDeviation(input[0]))
|
|
}
|
|
|
|
readlineInterface.on('close', solution)
|