洛谷 P5707 【深基2.例12】上学迟到
更多...
#include <luogu.h>
|
static int | main (istream &cin, ostream &cout) |
|
洛谷 P5707 【深基2.例12】上学迟到
在文件 luogu.h 第 114 行定义.
◆ main()
int luogu::P5707::main |
( |
istream & | cin, |
|
|
ostream & | cout ) |
|
static |
在文件 luogu.cpp 第 316 行定义.
316 {
317 unsigned int s;
318 unsigned int v;
319 cin >> s >> v;
320 double t = 8 * 60 - (static_cast<double>(s) / static_cast<double>(v) + 10);
321 if(t < 0) {
322 t += 24 * 60;
323 }
324 const int h = static_cast<int>(t / 60);
325 const int m =
static_cast<int>(t) % 60;
326 if(h < 10) {
327 cout << 0;
328 }
329 cout << h << ":";
330 if(m < 10) {
331 cout << 0;
332 }
334 return 0;
335 }
被这些函数引用 luogu::TEST().
该类的文档由以下文件生成: