#K55132. Count Single Task Assignments and Pair Combinations
Count Single Task Assignments and Pair Combinations
Count Single Task Assignments and Pair Combinations
You are given an integer \(n\) representing the total number of unique tasks. Your goal is to compute two values:
- The number of single task assignments, which is simply \(n\).
- The number of unique pairs that can be formed from these tasks. This is computed as \(\displaystyle \frac{n \times (n-1)}{2}\).
For example, if \(n=3\), the answer is 3
for single assignments and 3
for pair combinations. Implement a solution that reads the input from standard input and writes the results to standard output in the format specified.
inputFormat
The input consists of a single line containing one integer \(n\) (\(1 \leq n \leq 10^5\)), representing the number of tasks.
outputFormat
Output two integers separated by a space. The first integer is the number of single task assignments (which is \(n\)), and the second integer is the number of unique pair combinations, which is \(\displaystyle \frac{n(n-1)}{2}\).
## sample1
1 0