Submission #36608635


Source Code Expand

#include <bits/stdc++.h>
#define M_PI 3.14159265358979323846
typedef  long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
using namespace std;
bool judge(int H, int M) {
    int A,B, C,D;
    A = H / 10;
    B = H % 10;
    C = M / 10;
    D = M % 10;
    bool f;
    if (A == 2) {
        if (C <= 3 && B <= 5) {
            f = 1;
        }
        else {
            f = 0;
        }
    }
    else {
        if (B <= 5) {
            f = 1;
        }
        else {
            f = 0;
        }
    }
    return f;
}

int main() {
    int H, M;
    cin >> H >> M;
    while (judge(H, M) == 0) {
        M++;
        if (M == 60) {
            M = 0;
            H++;
        }
        if (H == 24) {
            H = 0;
        }
    }
    cout << H << " " << M << endl;
    return 0;
}

Submission Info

Submission Time
Task B - Misjudge the Time
User amaoto
Language C++ (GCC 9.2.1)
Score 200
Code Size 867 Byte
Status AC
Exec Time 5 ms
Memory 3532 KiB

Compile Error

./Main.cpp: In function ‘bool judge(int, int)’:
./Main.cpp:9:16: warning: variable ‘D’ set but not used [-Wunused-but-set-variable]
    9 |     int A,B, C,D;
      |                ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 15
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 02_handmade_00.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt, 02_handmade_05.txt, 02_handmade_06.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 5 ms 3344 KiB
00_sample_01.txt AC 2 ms 3432 KiB
00_sample_02.txt AC 2 ms 3472 KiB
01_random_00.txt AC 2 ms 3404 KiB
01_random_01.txt AC 2 ms 3404 KiB
01_random_02.txt AC 2 ms 3520 KiB
01_random_03.txt AC 1 ms 3528 KiB
01_random_04.txt AC 1 ms 3432 KiB
02_handmade_00.txt AC 2 ms 3432 KiB
02_handmade_01.txt AC 2 ms 3480 KiB
02_handmade_02.txt AC 2 ms 3384 KiB
02_handmade_03.txt AC 2 ms 3532 KiB
02_handmade_04.txt AC 2 ms 3348 KiB
02_handmade_05.txt AC 3 ms 3384 KiB
02_handmade_06.txt AC 2 ms 3472 KiB