1042: 利用指针输出数组中值为0的数据元素下标

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:45 Solved:19

Description

输入一个一维数组,一维数组长度<=100

利用指针遍历一维数组,输出所有值为0的数据元素,在一维数组中的下标

如,数组中的原始数据为:1,0,3,4,0,2,5。则输出1 4。

Input

第1行,输入数组长度n
第2行,n个数字

Output

m行
每行为下标为0的下标

Sample Input Copy

8
1 2 3 0 4 0 5 0

Sample Output Copy

3
5
7