QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#204169 | #5279. New Time | OverLoad | Compile Error | / | / | Python3 | 563b | 2023-10-07 04:46:33 | 2023-10-07 04:46:34 |
Judging History
answer
#include <iostream>
#include <string>
using namespace std;
int main() {
string a;
cin >> a;
int minute = (a[0] - '0') * 10 + (a[1] - '0') * 60 + (a[3] - '0') * 10 + (a[4] - '0');
std::cin >> a;
int real_minute = (a[0] - '0') * 10 + (a[1] - '0') * 60 + (a[3] - '0') * 10 + (a[4] - '0');
int real = real_minute - minute;
if (real >= 0) {
cout << real / 60 << real % 60 << std::endl;
} else if (real < 0) {
std::cout << (1440 + real) / 60 << (1440 + real) % 60 << std::endl;
}
return 0;
}
Details
File "answer.code", line 3 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax