QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#204162#5279. New TimeOverLoadWA 0ms3620kbC++23557b2023-10-07 04:37:032023-10-07 04:37:04

Judging History

你现在查看的是最新测评结果

  • [2023-10-07 04:37:04]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3620kb
  • [2023-10-07 04:37:03]
  • 提交

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;
}

Details

Tip: Click on the bar to expand more detailed information

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