2023-10-23 23:16:24 +02:00
|
|
|
import readline from "node:readline"
|
2023-09-16 15:50:52 +02:00
|
|
|
|
2023-10-23 23:16:24 +02:00
|
|
|
import { getMaximumFrequencyDeviation } from "./getMaximumFrequencyDeviation.js"
|
2023-09-16 15:50:52 +02:00
|
|
|
|
|
|
|
const input = []
|
|
|
|
const readlineInterface = readline.createInterface({
|
|
|
|
input: process.stdin,
|
2023-10-23 23:16:24 +02:00
|
|
|
output: process.stdout,
|
2023-09-16 15:50:52 +02:00
|
|
|
})
|
2023-10-23 23:16:24 +02:00
|
|
|
readlineInterface.on("line", (value) => {
|
2023-09-16 15:50:52 +02:00
|
|
|
input.push(value)
|
|
|
|
})
|
|
|
|
|
|
|
|
const solution = () => {
|
|
|
|
console.log(getMaximumFrequencyDeviation(input[0]))
|
|
|
|
}
|
|
|
|
|
2023-10-23 23:16:24 +02:00
|
|
|
readlineInterface.on("close", solution)
|