| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12375 | grometeic series |
|
| 12408 | Matrix Multiplication |
|
| 12432 | Find the Maximum Duplicate Number |
|
Description
In mathematics, a geometric progression, also known as a geometric sequence, is a sequence of numbers where each term after the first is found by multiplying the previous one by a fixed, non-zero number called the common ratio. For example, the sequence 2, 6, 18, 54, ... is a geometric progression with common ratio 3.
Here, you are given an geometric sequence, where the initial term is ‘a’, the total number of terms in this sequence is ‘n’, and the common ratio is ‘r’. Then, in this sequence: what is the value of the nth term, and what is the sum of all the terms?

note that : if use visual studio add #pragma warning(disable:4996) in first line to use scanf function
Input
Three integers separated by blanks. The first integer (a) is the initial term, where 0<a<10. The second integer (n) is the total number of terms in the sequence, where n>0 and n<10. The third integer (r) is the common ratio, where 0<r<4.
a,n,r should be type double and use %lf.
you should import lib math.h and use pow(r,n) to calculate r^n.
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 need to print '\n' at the end of the output.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
One day, a mathematician hired you to implement "matrix multiplication". The details are shown below:

Note : If you are using visual studio, add #pragma warning(disable:4996) in the first line so that you can use scanf on your local machine
Hint: C[i][j] = A[i][0] * B[0][j] + A[i][1] * B[1][j] + .... A[i][An-1] * B[An-1][j]
Input
You are given two input matrices, A and B.
For each matrix, m represents the number of rows and n represents the number of columns.
It is guaranteed that 2<= m <= 10, 2<= n <= 10 and every value in the given matrices are integers in the range of [0, 100].
Also, you may assume that it is valid to multiply A with B, i.e., number of columns of A equals number of rows of B.
The input format may be described as the following:
Am An
A11 A12 ,,, A1n
A21 A22 ... A2n
...
Bm Bn
B11 B12 ,,, B1n
B21 B22 ... B2n
...
Output
Output the result of matrix multiplication.
All elements in a row should be separated by a space, and make sure there is a trailing space followed by a newline character at the end of each line.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Given a sequence containing N integers where each integer is between 1 and 1000(exclusive), prove that at least one duplicate number must exist. Assume that there could be multiple duplicate numbers, find the maximum value of duplicate one.
Note : If you are using visual studio, add #pragma warning(disable:4996) in the first line so that you can use scanf on your local machine.
Input
N
S
N is an integer, and 1<=N<10000.
S is a sequence. Each integer in it is between 1 and 1000(exclusive).
Output
Maximum duplicate number.
Remember change line in the end.