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

洛谷 P1035 [NOIP2002 普及组] 级数求和 更多...

#include <luogu.h>

静态 Public 成员函数

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

详细描述

洛谷 P1035 [NOIP2002 普及组] 级数求和

在文件 luogu.h273 行定义.

成员函数说明

◆ main()

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

在文件 luogu.cpp734 行定义.

734 {
735 int k;
736 cin >> k;
737 int n = 1;
738 double s = 0;
739 while(s <= k) {
740 s += 1.0 / static_cast<double>(n++);
741 }
742 cout << n - 1;
743 return 0;
744 }

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


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