結果

問題 No.70 睡眠の重要性!
ユーザー うわばみうわばみ
提出日時 2020-04-29 17:30:19
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 5,000 ms
コード長 602 bytes
コンパイル時間 1,175 ms
コンパイル使用メモリ 65,340 KB
実行使用メモリ 22,728 KB
最終ジャッジ日時 2023-08-19 11:22:41
合計ジャッジ時間 2,096 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
22,688 KB
testcase_01 AC 58 ms
20,800 KB
testcase_02 AC 58 ms
22,728 KB
testcase_03 AC 58 ms
20,620 KB
testcase_04 AC 59 ms
22,728 KB
testcase_05 AC 59 ms
18,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

class Program
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        int result = 0;
        for(int i = 0; i < n; i++)
        {
            string[] s = Console.ReadLine().Split(' ');
            int temp0 = int.Parse(s[0].Split(':')[0]) * 60 + int.Parse(s[0].Split(':')[1]);
            int temp1 = int.Parse(s[1].Split(':')[0]) * 60 + int.Parse(s[1].Split(':')[1]);
            while(temp1 < temp0)
            {
                temp1 += 1440;
            }
            result += temp1 - temp0;
        }
        Console.WriteLine($"{result}");
    }
}
0