编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#116920 #1463. [L1-1] 你是否清醒 Accepted 100 17 ms 500 K C++ 11 / 598 B szc 2025-04-15 21:43:26
显示原始代码
#include <iostream>
using namespace std;

int main() {
    int x, y;
    cin >> x >> y;  // 读取当前时间的小时和分钟

    // 将当前时间转换为总分钟数
    int current = x * 60 + y;

    // 定义关键时间点(分钟数)
    const int sleep_time = 8 * 60;  // 8:00
    const int wake_time = 16 * 60;  // 16:00

    // 判断是否清醒
    if ((current >= wake_time) || (current < sleep_time)) {
        cout << "Good morning!" << endl;
    } else {
        cout << "How can you sleep at your age?" << endl;
    }

    return 0;
}
子任务 #1
Accepted
得分:100
测试点 #1
Accepted
得分:100
用时:2 ms
内存:244 KiB

输入文件(1.in

8 0

答案文件(1.out

How can you sleep at your age?

用户输出

How can you sleep at your age?

系统信息

Exited with return code 0
测试点 #2
Accepted
得分:100
用时:3 ms
内存:472 KiB

输入文件(2.in

16 0

答案文件(2.out

Good morning!

用户输出

Good morning!

系统信息

Exited with return code 0
测试点 #3
Accepted
得分:100
用时:2 ms
内存:256 KiB

输入文件(3.in

15 59

答案文件(3.out

How can you sleep at your age?

用户输出

How can you sleep at your age?

系统信息

Exited with return code 0
测试点 #4
Accepted
得分:100
用时:2 ms
内存:244 KiB

输入文件(4.in

7 59

答案文件(4.out

Good morning!

用户输出

Good morning!

系统信息

Exited with return code 0
测试点 #5
Accepted
得分:100
用时:2 ms
内存:224 KiB

输入文件(5.in

8 1

答案文件(5.out

How can you sleep at your age?

用户输出

How can you sleep at your age?

系统信息

Exited with return code 0
测试点 #6
Accepted
得分:100
用时:2 ms
内存:372 KiB

输入文件(6.in

16 1

答案文件(6.out

Good morning!

用户输出

Good morning!

系统信息

Exited with return code 0
测试点 #7
Accepted
得分:100
用时:2 ms
内存:500 KiB

输入文件(7.in

8 2

答案文件(7.out

How can you sleep at your age?

用户输出

How can you sleep at your age?

系统信息

Exited with return code 0
测试点 #8
Accepted
得分:100
用时:2 ms
内存:500 KiB

输入文件(8.in

3 25

答案文件(8.out

Good morning!

用户输出

Good morning!

系统信息

Exited with return code 0