第 043 场 AtCoder Beginner Contest
A
孩子与糖果(ABC 版)
Children and Candies (ABC Edit)
AtCoder
⌀ 0
原题
←B →

孩子与糖果(ABC 版)AI (CI翻译)

Problem Statement

题目描述

AI (CI翻译)

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?

AtCoder 幼儿园里有 $N$ 个孩子。Evi 老师会让孩子们排成一队,然后给队伍中的第一个孩子 $1$ 颗糖果,给第二个孩子 $2$ 颗糖果,……,给第 $N$ 个孩子 $N$ 颗糖果。一共需要多少颗糖果?AI (CI翻译)

Constraints

约束条件

AI (CI翻译)
  • $1≦N≦100$
  • $1≦N≦100$
AI (CI翻译)

Input

输入格式

AI (CI翻译)

The input is given from Standard Input in the following format:

输入通过标准输入给出,格式如下:AI (CI翻译)

N

N
AI (CI翻译)

Output

输出格式

AI (CI翻译)

Print the necessary number of candies in total.

输出所需糖果的总数。AI (CI翻译)

样例

Input #1
3
Output #1
6
The answer is $1+2+3=6$.
Input #2
10
Output #2
55
The sum of the integers from $1$ to $10$ is $55$.
Input #3
1
Output #3
1
Only one child. The answer is $1$ in this case.
题目信息
题号
abc043_a
时间限制
2 s
内存限制
256 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。