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

AcWing 668. 游戏时间2 更多...

#include <acwing.h>

静态 Public 成员函数

static int main (istream &, ostream &)
 

详细描述

AcWing 668. 游戏时间2

在文件 acwing.h450 行定义.

成员函数说明

◆ main()

int acwing::acwing668::main ( istream &  cin,
ostream &  cout 
)
static

在文件 acwing.cpp1206 行定义.

1206 {
1207 unsigned int a;
1208 unsigned int b;
1209 unsigned int c;
1210 unsigned int d;
1211 cin >> a >> b >> c >> d;
1212 unsigned int t = (c * 60 + d - (a * 60 + b) + 24 * 60) % (24 * 60);
1213 if(t == 0) {
1214 t = 24 * 60;
1215 }
1216 cout << "O JOGO DUROU " << t / 60 << " HORA(S) E " << t % 60 << " MINUTO(S)";
1217 return 0;
1218 }

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


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