2147 - I2P(I)2020_Huang_Quiz Scoreboard

Time

2020/10/29 08:00:00 2020/10/29 10:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12951 Star Underscore Pyramid
12952 Integer to Binary Conversion
12953 Mother's Day

12951 - Star Underscore Pyramid   

Description

Write a C program that reads a positive integer
n>0, representing the number of lines, and then
prints the pattern shown in the sample I/O.

If the user’s input is invalid, output
“invalid\n”.

Input

Positive Integer

Output

Combination of "*" and "_"

Sample Input  Download

Sample Output  Download

Tags




Discuss




12952 - Integer to Binary Conversion   

Description

Given a nonnegative integer n>=0, print the binary representation of n.
If the user’s input is invalid, output “invalid\n”.

Input

Positive Integer

Output

Positive Integer, with combinations of 1s and 0s along with a linebreak.

Sample Input  Download

Sample Output  Download

Tags




Discuss




12953 - Mother's Day   

Description

  • Write a program to input a year n and output out the Mother’s day (2nd Sunday of May) in that year.
  • Your program must be able to show the Mother’s days in the past and in the future.
  • We have 1582 < n 2147483647 (Hint: 1583/1/1 is Saturday.)
  • If the user’s input is invalid, output “invalid\n”.

Input

Integer n, such that 1582 < n ≤ 2147483647 

Output

M/D, such that M is tthe month and D the date.

Sample Input  Download

Sample Output  Download

Tags




Discuss