1 solutions

  • 0
    @ 2025-11-5 15:07:53

    Pascal :

    var a:array[1..100] of real;
        n,i:longint;
        h:real;
    begin
      readln(h,n);
      for i:=1 to n do read(a[i]);
      for i:=1 to n do
      if a[i]>=0 then a[i]:=h+a[i]
                 else a[i]:=h+a[i];
      write(h:0:2,' ');
      for i:=1 to n do write(a[i]:0:2,' ');
      end.
    
    
    
    • 1

    Information

    ID
    16432
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By