2130 - IP_2020_YOU_LAB5 Scoreboard

Time

2020/10/20 15:30:00 2020/10/20 18:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12923 Exponentiation
12924 Pascal's Triangle

12923 - Exponentiation   

Description

Given two integers N, e. Please write a C program to calculate Ne.

Input

Two integers N(base number), e(exponent).

Note:

  1. 32,767 >= N >= -32,768
  2. e >= 0
  3. 32,767 >= Ne >= -32,768

Output

Output should follow below format:

M

Note:

  1. Need to have a return value('\n') at the end of your string.

Sample Input  Download

Sample Output  Download

Tags




Discuss




12924 - Pascal's Triangle   

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:

  1. 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:

  1. 32,767 >= R, C >= 0

Output

Output should follow below format:

N

Note that:

  1. Need to have a return value('\n') at the end of your string.

Sample Input  Download

Sample Output  Download

Tags




Discuss