結果
| 問題 | No.70 睡眠の重要性! | 
| コンテスト | |
| ユーザー |  mencotton | 
| 提出日時 | 2018-02-18 20:11:09 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 27 ms / 5,000 ms | 
| コード長 | 675 bytes | 
| コンパイル時間 | 768 ms | 
| コンパイル使用メモリ | 111,176 KB | 
| 実行使用メモリ | 19,072 KB | 
| 最終ジャッジ日時 | 2024-07-04 02:45:00 | 
| 合計ジャッジ時間 | 1,406 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
        }
    }
}
            
            
            
        