#CCBCHBAHAI0000062. Khởi tạo toàn bộ phần tử bằng vòng for (Initialize All Elements with a For Loop)
Khởi tạo toàn bộ phần tử bằng vòng for (Initialize All Elements with a For Loop)
Initialize All Elements with a For Loop
Source: Programming in C
Version: Phuoc Hung OJ Extended
Problem Statement
You are given the logical size of an integer array. The array has enough physical capacity, but the elements being used have not yet been assigned values. Use a loop over indices to assign every used element the value , then print the initialized elements.
This task models run-time initialization by assigning each element, not a declaration initializer.
Input
One line contains the integer .
Output
Print integers equal to on one line, separated by single spaces.
Subtasks
Subtask 1 (20 points): .
Subtask 2 (30 points): .
Subtask 3 (50 points): .
Examples
Input
6
Output
0 0 0 0 0 0
Explanation
Here . The loop assigns to . Therefore all six printed elements are zero.