結果

問題 No.70 睡眠の重要性!
ユーザー mencottonmencotton
提出日時 2018-02-18 20:11:09
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 56 ms / 5,000 ms
コード長 675 bytes
コンパイル時間 1,799 ms
コンパイル使用メモリ 102,272 KB
実行使用メモリ 23,728 KB
最終ジャッジ日時 2023-09-17 05:23:11
合計ジャッジ時間 2,660 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
23,692 KB
testcase_01 AC 51 ms
23,728 KB
testcase_02 AC 51 ms
21,708 KB
testcase_03 AC 54 ms
23,728 KB
testcase_04 AC 52 ms
21,656 KB
testcase_05 AC 56 ms
23,672 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

namespace _70
{
    class Program
    {
        static void Main(string[] args)
        {
            int ret = 0;
            int n = int.Parse(Console.ReadLine());
            for (int i = 0; i < n; i++)
            {
                string[] s = Console.ReadLine().Split();
                int[] x = s[0].Split(':').Select(int.Parse).ToArray();
                int[] y = s[1].Split(':').Select(int.Parse).ToArray();
                int a = x[0] * 60 + x[1];
                int b = y[0] * 60 + y[1];
                if (a > b) b += 60 * 24;
                ret += b - a;
            }
            Console.WriteLine(ret);
        }
    }
}
0