# | Problem | Pass Rate (passed user / total user) |
---|---|---|
12923 | Exponentiation |
|
12924 | Pascal's Triangle |
|
Description
Given two integers N, e. Please write a C program to calculate Ne.
Input
Two integers N(base number), e(exponent).
Note:
- 32,767 >= N >= -32,768
- e >= 0
- 32,767 >= Ne >= -32,768
Output
Output should follow below format:
M
Note:
- Need to have a return value('\n') at the end of your string.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
In Pascal's triangle, each number is the sum of the two numbers directly above it.
Given two integers R, C to represents the index inside a Pascal’s triangle. Please write a C program to calculate its value. E.g. R = 4, C = 2. Value is 6.
Hint: if C equals to 0 or R. Value is 1.
Note:
- Would not give numbers which means illegal index inside Pascal’s triangle. E.g. R = 1, C = 3 (X)
Input
Two integers R(row), C(column).
Note:
- 32,767 >= R, C >= 0
Output
Output should follow below format:
N
Note that:
- Need to have a return value('\n') at the end of your string.