洛谷 P5716 【深基3.例9】月份天数
更多...
#include <luogu.h>
|
static int | main (istream &cin, ostream &cout) |
|
洛谷 P5716 【深基3.例9】月份天数
在文件 luogu.h 第 164 行定义.
◆ main()
int luogu::P5716::main |
( |
istream & | cin, |
|
|
ostream & | cout ) |
|
static |
在文件 luogu.cpp 第 430 行定义.
430 {
431 int year;
432 int month;
433 cin >> year >> month;
434 const bool bissextile = year % 400 == 0 || year % 4 == 0 && year % 100 != 0;
435 if(month == 4 || month == 6 || month == 9 || month == 11) {
436 cout << 30;
437 } else if(month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
438 cout << 31;
439 } else if(bissextile) {
440 cout << 29;
441 } else {
442 cout << 28;
443 }
444 return 0;
445 }
被这些函数引用 luogu::TEST() , 以及 luogu::TEST().
该类的文档由以下文件生成: