set
Gigel, returned to school,
has learned about number groups. The teacher, eager to make up for lost time,
has given them a heftier homework assignment for the first Saturday. Sets of
numbers had to be written and the sum of their elements calculated. The first
sets looked like this:
A1={0}, A2={2, 4}, A3={6, 8, 10}, A4={12, 14, 16, 18}, ...
Then Gigel got bored and went outside to play. When he got back he realized
he didn't have enough time to finish his homework. He said to himself that if
he could write the first element of every set and calculate the sum of its elements
the teacher would be pleased.
Task
Write a program that helps
Gigel write his homework: determine the first element of set An
and calculate the sum of its elements.
Input Data
Input file set.in
contains on the first line a positive integer n,
representing the set's index.
Output Data
Output file set.out
will contain two lines. The first line will contain a positive integer representing
the first element of the set and the second line the sum of the set's elements.
Restrictions
0 < n <= 100000000
Examples
set.in | set.out |
5 |
20 120 |
Time limit: 0.1 seconds/test
prof. George Vlad
ISJ Suceava
Contact:geodalv@yahoo.com