read <$> getLine :: IO [Integer]
-- reading space separated list of ints
map read . words <$> getLine :: IO [Int]
process.stdin.on('data', processLine)
function processLine (line) {
const string = line + ''
console.log(string)
}
const ints = await new Promise(resolve => {
let string = ''
process.stdin
.on('data', data => string += data.toString())
.on('close', () => resolve(string.split('\n').map(line => Number.parseInt(line))))
})
(read)
fgl
type
TFloatList = specialize TFPGList<Double>;
var
List: TFloatList;
D: Double;
begin
List := TFloatList.Create;
while not Eof do
begin
Read(D);
List.Add(D);
end;
List.Free;
end.
let mut string = String::new();
io::stdin().read_to_string(&mut string)?;
let result = string
.lines()
.map(i32::from_str)
.collect::<Result<Vec<_>, _>>();
type
TFloatList = specialize TFPGList<Double>;
var
List: TFloatList;
D: Double;
begin
List := TFloatList.Create;
while not Eof do
begin
Read(D);
List.Add(D);
end;
List.Free;
end.
let mut string = String::new();
io::stdin().read_to_string(&mut string)?;
let result = string
.lines()
.map(i32::from_str)
.collect::<Result<Vec<_>, _>>();