problemscpp
A collection of my answers to algorithm problems in c++.
静态 Public 成员函数 | 所有成员列表
luogu::P5737类 参考

洛谷 P5737 【深基7.例3】闰年展示 更多...

#include <luogu.h>

静态 Public 成员函数

static int main (istream &cin, ostream &cout)
 

详细描述

洛谷 P5737 【深基7.例3】闰年展示

在文件 luogu.h607 行定义.

成员函数说明

◆ main()

int luogu::P5737::main ( istream &  cin,
ostream &  cout 
)
static

在文件 luogu.cpp2296 行定义.

2296 {
2297 int x;
2298 int y;
2299 cin >> x >> y;
2300 ostringstream oss;
2301 int sum = 0;
2302 for(int year = x; year <= y; year++) {
2303 if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
2304 oss << year << ' ';
2305 sum++;
2306 }
2307 }
2308 cout << sum << endl
2309 << oss.str();
2310 return 0;
2311 }

被这些函数引用 luogu::TEST().


该类的文档由以下文件生成: