Toggle navigation
HUSTOJ
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
Recent
Login
Problem2169--Cumulative summation
2169: Cumulative summation
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
0
Solved:
0
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
Write a program that reads n, and outputs the sum from 0 to n-1 in steps of 1,
Input
Given a positive integer n
Output
The sum of the values from 0 to n-1
Sample Input
Copy
4
Sample Output
Copy
6
Source/Category
10