結果

問題 No.2371 最大の試練それは起床
ユーザー bluemeganebluemegane
提出日時 2023-07-08 11:31:20
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 54 ms / 2,000 ms
コード長 609 bytes
コンパイル時間 1,259 ms
コンパイル使用メモリ 67,180 KB
実行使用メモリ 22,848 KB
最終ジャッジ日時 2023-09-29 12:52:59
合計ジャッジ時間 2,694 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
20,816 KB
testcase_01 AC 49 ms
20,828 KB
testcase_02 AC 45 ms
22,720 KB
testcase_03 AC 44 ms
20,704 KB
testcase_04 AC 45 ms
20,820 KB
testcase_05 AC 52 ms
20,828 KB
testcase_06 AC 46 ms
22,708 KB
testcase_07 AC 45 ms
20,664 KB
testcase_08 AC 44 ms
18,564 KB
testcase_09 AC 45 ms
20,700 KB
testcase_10 AC 46 ms
20,768 KB
testcase_11 AC 45 ms
22,720 KB
testcase_12 AC 44 ms
20,700 KB
testcase_13 AC 46 ms
20,768 KB
testcase_14 AC 53 ms
20,812 KB
testcase_15 AC 53 ms
20,760 KB
testcase_16 AC 52 ms
18,664 KB
testcase_17 AC 52 ms
20,772 KB
testcase_18 AC 47 ms
22,848 KB
testcase_19 AC 54 ms
22,724 KB
testcase_20 AC 50 ms
22,784 KB
testcase_21 AC 47 ms
20,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var h = int.Parse(line[0]);
        var m = int.Parse(line[1]);
        getAns(h, m);
    }
    static int calc(int h, int m, int s) => h * 3600 + m * 60 + s;
    static void getAns(int h, int m)
    {
        var start = calc(7, 30, 0);
        var end = calc(8, 30, 0);
        var wake = calc(h, m, 30);
        string ans;
        if (wake > end) ans = "No";
        else if (wake < start) ans = "Yes";
        else ans = "Late";
        Console.WriteLine(ans);
    }
}
0