|
|
back to boardWhy WA??? const kmax = 101; var n, n2, k, t, i, j: longint; a: array[1..kmax] of longint; 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. Your code is AC, never post AC codes in future (-) - |
|
|