Time Limit: 2 sec / Memory Limit: 256 MB
配点 : 100 点
問題文
競プロ幼稚園にはN人の子供がいます。えび先生は、子供たちを一列に並べ、一人目にはキャンディーを1個,二人目には2個,...,N人目にはN個あげることにしました。必要なキャンディーの個数の合計は何個でしょう?
制約
- 1≦N≦100
入力
入力は以下の形式で標準入力から与えられる。
N
出力
必要なキャンディーの個数の合計を出力せよ。
入力例 1
3
出力例 1
6
1+2+3=6が答えになります。
入力例 2
10
出力例 2
55
1から10までの和は55です。
入力例 3
1
出力例 3
1
子供は一人しかいません。この時答えは1になります。
Score : 100 points
Problem Statement
There are N children in AtCoder Kindergarten. Mr. Evi will arrange the children in a line, then give 1 candy to the first child in the line, 2 candies to the second child, ..., N candies to the N-th child. How many candies will be necessary in total?
Constraints
- 1≦N≦100
Input
The input is given from Standard Input in the following format:
N
Output
Print the necessary number of candies in total.
Sample Input 1
3
Sample Output 1
6
The answer is 1+2+3=6.
Sample Input 2
10
Sample Output 2
55
The sum of the integers from 1 to 10 is 55.
Sample Input 3
1
Sample Output 3
1
Only one child. The answer is 1 in this case.