Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Nguồn bài:
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
Given a sequence of ~N~ integers with absolute values not exceeding ~10^9~, print the number of positive elements and their sum.
Input
- The first line contains an integer ~N~ ~(N ≤ 10^5)~.
- The next line contain ~N~ integer numbers.
Output
- Print two integers:
- The first integer is the count of positive elements in the sequence.
- The second integer is the sum of all positive elements in the sequence.
Sample Input
5
1 -2 3 -4 5
Sample Output
3 9
Bình luận