Да. т.к. 7% от 200000 это 14000, следовательно объём древесины будет уменьшаться
# # Код на ruby 2.2.3p173
max = 0
max_last = 0
min = 1000
min_last = 1000
n = 0
begin
max_last = max
min_last = min
File.open("input.txt", "r") do |infile|
line = infile.gets.strip
p line
n = line.to_i if n == 0
while (line = infile.gets)
p line
number = line.strip.to_i
max = number if max == 0 or number == max + 1
min = number if min == 1000 or number == min - 1
p [min, max]
end
end
end until (max == max_last and max < n) or (min > 0 and min == min_last) or (min == 0 and max == n)
p max + 1 if max == max_last and max < n
p min - 1 if min > 0 and min == min_last
p "error" if min == 0 and max == n
декларативные и процедурные
T = n mod 10; if (n mod t = 0) then writeln(t);
t = n div 10 mod 10; if (n mod t = 0) then writeln(t);
t = n div 100 mod 10; if (n mod t = 0) then writeln(t);
t = n div 1000 mod 10; if (n mod t = 0) then writeln(t);