// PascalABC.NET
begin
var (se, so) := (0, 0);
foreach var s in ReadLines('input.txt') do
var t := s.ToInteger;
if t.IsEven then
se += t
else
so += t
end;
WriteAllText('output.txt', (se / so).ToString)
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
// PascalABC.NET
begin
var (se, so) := (0, 0);
foreach var s in ReadLines('input.txt') do
begin
var t := s.ToInteger;
if t.IsEven then
se += t
else
so += t
end;
WriteAllText('output.txt', (se / so).ToString)
end.