2117 - I2P(I)2020_Huang_lab2 Scoreboard

Time

2020/10/08 07:58:00 2020/10/08 12:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12899 Calendar Calculation
12900 Detecting Leap Year

12899 - Calendar Calculation   

Description

Write a program to input a date in year 2020 and calculate the number of days from 1/1/2020 to that date, inclusive.

Hint:

Your output needs a break line character "\n".

 

 

  

Input

M/D

Integer (month) such that 1 <= M <= 12.

Integer D (day) such that 1 <= D <= 31.

 

Output

E

Integer E (difference in days) such that 1 <= D <= 366.

Sample Input  Download

Sample Output  Download

Tags




Discuss




12900 - Detecting Leap Year   

Description

Write a program to determine if the input year is a leap year (閏年). 

  1. Any year indivisible by 4 is a non-leap year.
  2. Any year divisible by 4 and indivisible by 100 is a leap year.
  3. Any year divisible by 100 and indivisible by 400 is a non-leap year.
  4. Any year divisible by 400 is a leap year.

Given a year. Please Write a C program to tell whether it is a leap year.

Input

An integer Y(year). Note that 1 <= Y <= 2600.

Output

"non-leap year. " or  "leap year. "

Sample Input  Download

Sample Output  Download

Tags




Discuss