Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
B prethodnih B sledecih
program BprethodnihBsledecih; var a:array[1..50] of integer; b,i,n,j,sum1:integer; begin read(n); for i:=1 to n do read(a[i]); read(b); for i:=1 to n do begin j:=1;sum1:=0; while(j<=b) and ((i-j)>0) do begin sum1:=sum1+a[i-j]; j:=j+1 end; if(((j-1)*a[i])>sum1) then begin j:=1; sum1:=0; while(j<=b) and ((i+j)<=n) do begin sum1:=sum1+a[i+j]; j:=j+1 end; if(((j-1)*a[i])>sum1) then writeln(i) end end end.
run
|
edit
|
history
|
help
0
Random
exRecords
P170815A - Cálculo da massa de um tanque
123
okazivac-dinamicka alokacija memorije
basketball_player_training
Pi
2
BIANCA SAMPAIO ALFRADIQUE 600615759
test27