3003: 循环控制语句- 跳过负数求和

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:12 Solved:6

Description

输入n个整数,求所有正数的和,遇到负数则跳过

Input

: 第一行输入n(1≤n≤100)

第二行输入n个整数(-100≤每个数≤100)

Output

输出正数的和

Sample Input Copy

6
1 -2 3 -4 5 6

Sample Output Copy

15