#B. [GESP202303 一级] 每月天数

    Type: Default 1000ms 256MiB

[GESP202303 一级] 每月天数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

小明刚刚学习了每月有多少天,以及如何判断平年和闰年,想到可以使用编程方法求出给定的月份有多少天。你能做到吗?

输入格式

输入一行,包含两个整数 A,BA, B,分别表示一个日期的年、月。约定 2000A30002000 \leq A \leq 30001B121 \leq B \leq 12

输出格式

输出一行,包含一个整数,表示输入月份有多少天。

样例 #1

样例输入 #1

2022 1

样例输出 #1

31

样例 #2

样例输入 #2

2020 2

样例输出 #2

29

GESP202303 一级 C++

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
3
Start at
2024-5-6 15:30
End at
2024-5-21 15:30
Duration
360 hour(s)
Host
Partic.
1