| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 10716 | Arithmetic Sequence |
|
| 11097 | I2P 2016 HW1 |
|
| 11557 | A question standing for chicken and rabbit |
|
Description
An arithmetic sequence is a sequence of numbers such that the difference between the consecutive terms is a constant. For instance, the sequence 5, 7, 9, 11, 13, 15 … is an arithmetic sequence with common difference of 2.
Here, you are given an arithmetic sequence, where the initial term is ‘a’, the total number of terms in this sequence is ‘n’, and the common difference of successive terms is ‘d’. Then, in this sequence: what is the value of the nth term, and what is the sum of all the terms?
Input
Three integers separated by blanks. The first integer (a) is the initial term, where -1000<a<1000. The second integer (n) is the total number of terms in the sequence, where n>0 and n<1000. The third integer (d) is the common difference, where -1000<d<1000.
Output
Two values separated by a blank. The first value is the nth term of the sequence, and the second value is the sum of the sequence. Note that you do not need to print '\n' at the end of the output.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Roy, Tommy and Kimo are three good friends.
All of them have some money.
1. Roy and Tommy have X dollors.
2. Tommy and Kimo have Y dollors.
3. Roy and Kimo have Z dollors.
How many dollars does each of them have?
Input
Three positive even integers, X, Y and Z.
Output
The output contains three positive even integers indicating the money of Roy, Tommy, and Kimo.
There is a whitespace between any two integers and a newline character '\n' at the end of the line.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
In ancient China, farmers always bothered their heads about caculating the amount of their livestock.
Today, we are going to help the farmers to calculate.
In one farm, some of rabbits and chickens live together, and we can get their total number and thier total legs.
Suppose the total number of rabbits and chickens is "a", and the total number of their legs is "b".
Plese help the farmers calculate the exact number of rabbits and chickens by using a and b.
Input
There are 2 inputs.
First is the totoal number of animal, and the second is the totoal number of their legs.
The number will be less than 2*1010 and bigger than or equal to 0.
Output
Print number of the chicken and rabbit respectively.
(Seperated by one blank and print a new line at the end)