Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
бассейн
const n = 5; var i, s, max, h, h_next, c : integer; begin s := 0; readln (h); readln (h_next); c := 0; max := h; for i := 1 to n do begin if h <= h_next then begin max := h_next; if c = 0 then begin s := s + h; end else begin if h_next > max then begin s := s + max * c; max := h_next; c := 0; end else begin s := s + h_next * c; end end end else begin c := c + 1; s := s + h_next; end; h := h_next; readln (h_next); end; writeln (s); end.
run
|
edit
|
history
|
help
0
P170815A - Cálculo da massa de um tanque
nomer9
POBLAR Y MOSTRAR VECTOR EDADES
NHATANH
for for fib
Find Nash Equilibrium
TanTai11A2@
135
For2
Урок 3, задача 10 (1483). Два момента времени