No.1636 Forest
問題文最終更新日: 2021-08-06 20:38:58
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 308
(順位表)
の他の問題:
Problem Statement
There are $N-1$ trees, each with $N$ vertices. How many edges are there in total?
Constraints
$2≤N≤100$
All inputs are integers.
Input
$N$
$N$ is given on line $1$.
Output
Print the answer on $1$ line. Print a newline at the end.
Sample
Sample 1
Input
2
Output
1
There is $1$ tree with vertex $2$, so the answer is $1$.
Sample 2
Input
3
Output
4
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
harurun
magsta
serpent