QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#673700#5279. New TimeIllusionaryDominance#TL 0ms3820kbC++20416b2024-10-25 09:10:182024-10-25 09:10:21

Judging History

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

  • [2024-10-25 09:10:21]
  • 评测
  • 测评结果:TL
  • 用时:0ms
  • 内存:3820kb
  • [2024-10-25 09:10:18]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

int main() {
    int a, b, c, d;
    scanf("%d:%d\n%d:%d", &a, &b, &c, &d);
    int ans = 0;
    while (b != d) {
        b ++;
        ans ++;
        if (b == 60) {
            b = 0;
            a ++;
        }
    }
    while (a != c) {
        a ++;
        ans ++;
        if (a == 24) a = 0;
    }
    cout << ans << endl;
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3608kb

input:

11:57
12:00

output:

3

result:

ok 1 number(s): "3"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

09:09
21:21

output:

24

result:

ok 1 number(s): "24"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

19:44
08:50

output:

19

result:

ok 1 number(s): "19"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

13:45
17:58

output:

17

result:

ok 1 number(s): "17"

Test #5:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

02:57
21:05

output:

26

result:

ok 1 number(s): "26"

Test #6:

score: 0
Accepted
time: 0ms
memory: 3820kb

input:

18:15
22:59

output:

48

result:

ok 1 number(s): "48"

Test #7:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

18:12
09:42

output:

45

result:

ok 1 number(s): "45"

Test #8:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

00:00
00:00

output:

0

result:

ok 1 number(s): "0"

Test #9:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

00:00
23:59

output:

82

result:

ok 1 number(s): "82"

Test #10:

score: -100
Time Limit Exceeded

input:

23:59
00:00

output:


result: