HZNUOJ

【动态内存分配】一维动态数组

Tags:
Time Limit:  1 s      Memory Limit:   128 MB
Submission:798     AC:358     Score:88.57

Description

程序的主体框架已经写好,你只需提交你写的部分代码。

#include <stdio.h>
#include <stdlib.h>
int main()
{
    int i, n, *a;
    scanf("%d", &n);
/*你的代码将会被嵌在这*/
    for (i = 0; i < n; ++i)
    {
        scanf("%d", &a[i]);
    }
    for (i = 0; i < n; ++i)
    {
        printf("%d ", a[i]);
    }
    printf(" ");
    return 0;


完成程序使其能成功编译,并完成如下功能: 
读入n个数,然后输出这n个数。

Input

第一行一个整数n

第二行n个整数

Output

输出这n个整数,以空格相隔

Samples

input
10 1 1 1 1 1 1 1 1 1 1
output
1 1 1 1 1 1 1 1 1 1

Author

WEI, Lixin