Toggle navigation
HUSTOJ
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
Recent
Login
Problem2173--Summation of squares
2173: Summation of squares
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
0
Solved:
0
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
Write a program that reads in and sums the squares of positive integers until a value that 0 or less is read in.
Input
Input positive integers and input 0 or less for end
Output
The sum of the squares of the values
Sample Input
Copy
1 3 2 0
Sample Output
Copy
10
Source/Category
11