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

洛谷 P5709 【深基2.习6】Apples Prologue / 苹果和虫子 更多...

#include <luogu.h>

静态 Public 成员函数

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

详细描述

洛谷 P5709 【深基2.习6】Apples Prologue / 苹果和虫子

在文件 luogu.h98 行定义.

成员函数说明

◆ main()

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

在文件 luogu.cpp286 行定义.

286 {
287 int m;
288 int t;
289 int s;
290 cin >> m >> t >> s;
291 if(t == 0) {
292 cout << 0;
293 return 0;
294 }
295 int eaten = s / t;
296 if(t * eaten != s) {
297 eaten++;
298 }
299 cout << max(0, m - eaten);
300 return 0;
301 }

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


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