|
|
вернуться в форумWhy WA??? const kmax = 101; var n, n2, k, t, i, j: byte; a: array[1..kmax] of byte; begin read(k); for i := 1 to k do read(a[i]); for i := 1 to k - 1 do for j := 1 to k - i do if a[j] > a[j + 1] then begin t := a[j]; a[j] := a[j + 1]; a[j + 1] := t; end; n := 0; for i := 1 to k div 2 + 1 do inc(n, a[i] div 2 + 1); write(n); end. Type 'byte' seems to be not enough (-) |
|
|