QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#204162 | #5279. New Time | OverLoad | WA | 0ms | 3620kb | C++23 | 557b | 2023-10-07 04:37:03 | 2023-10-07 04:37:04 |
Judging History
answer
#include <iostream>
#include <string>
int main() {
std::string a;
std::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) {
std::cout << real / 60 << real % 60 << std::endl;
} else if (real < 0) {
std::cout << (1440 + real) / 60 << (1440 + real) % 60 << std::endl;
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3620kb
input:
11:57 12:00
output:
03
result:
wrong output format Expected integer, but "03" found