1 solutions

  • 0
    @ 2025-11-5 16:30:17

    Pascal :

    var s:string;
        t:char;
        n,i,j,l:longint;
    begin
      readln(s);
      readln(n);
      l:=length(s);
      for i:=1 to n do
      begin
        t:=s[l];
        for j:=l downto 1 do
          if j<>1 then
            s[j]:=s[j-1]
          else
            s[j]:=t;
      end;
      writeln(s);
    end.
    
    • 1

    Information

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