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

洛谷 P1423 小玉在游泳 更多...

#include <luogu.h>

静态 Public 成员函数

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

详细描述

洛谷 P1423 小玉在游泳

在文件 luogu.h303 行定义.

成员函数说明

◆ main()

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

在文件 luogu.cpp921 行定义.

921 {
922 double x;
923 cin >> x;
924 double sn = 2;
925 for(int i = 1; sn < x; i++) {
926 sn = 100 * (1 - pow(0.98, i));
927 if(sn >= x) {
928 cout << i;
929 return 0;
930 }
931 }
932 return 0;
933 }

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


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