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

洛谷 P5722 【深基4.例11】数列求和 更多...

#include <luogu.h>

静态 Public 成员函数

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

详细描述

洛谷 P5722 【深基4.例11】数列求和

在文件 luogu.h285 行定义.

成员函数说明

◆ main()

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

在文件 luogu.cpp764 行定义.

764 {
765 unsigned int n;
766 cin >> n;
767 unsigned int ans = 0;
768 for(unsigned int i = 1; i <= n; i++) {
769 ans += i;
770 }
771 cout << ans;
772 return 0;
773 }

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


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