1 条题解

  • 0
    @ 2021-6-15 12:56:59

    C++ :

    #include <cstdio>
    #include<cstdlib>
    #include <algorithm>
    using namespace std;
    int i,n,a[888888];
    int main()
    {
    scanf("%d",&n);
    for (i=1;i<=n;i++)scanf("%d",&a[i]);
    for (i=n;i>=1;i--)printf("%d ",a[i]);
    printf("\n");
    return 0;
    }
    

    Pascal :

    var i,n:longint;
        a:array[1..100] of longint;
    begin
      readln(n);
      for i:=1 to n do read(a[i]);
      for i:=n downto 1 do write(a[i],' ');
    end.  
    
    • 1

    信息

    ID
    751
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者