結果

問題 No.296 n度寝
ユーザー curryudon08curryudon08
提出日時 2021-02-28 22:31:18
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 42 ms / 1,000 ms
コード長 605 bytes
コンパイル時間 1,920 ms
コンパイル使用メモリ 110,288 KB
実行使用メモリ 27,444 KB
最終ジャッジ日時 2024-04-12 10:55:28
合計ジャッジ時間 2,467 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
25,148 KB
testcase_01 AC 31 ms
25,228 KB
testcase_02 AC 28 ms
27,132 KB
testcase_03 AC 26 ms
23,224 KB
testcase_04 AC 28 ms
25,212 KB
testcase_05 AC 27 ms
25,344 KB
testcase_06 AC 27 ms
25,148 KB
testcase_07 AC 42 ms
25,472 KB
testcase_08 AC 40 ms
27,444 KB
testcase_09 AC 28 ms
25,272 KB
testcase_10 AC 28 ms
23,348 KB
testcase_11 AC 27 ms
27,276 KB
testcase_12 AC 28 ms
25,260 KB
testcase_13 AC 28 ms
25,264 KB
testcase_14 AC 28 ms
25,344 KB
testcase_15 AC 28 ms
27,316 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 _0296
{
    class Program
    {
        static void Main(string[] args)
        {
            var s = Console.ReadLine().Split().Select(i => int.Parse(i)).ToArray();
            var n = s[0];
            var h = s[1];
            var m = s[2];
            var t = s[3];

            var dt = new DateTime(2021, 1, 1, h, m, 0);

            for(var i = 0; i < n - 1; i++){
                var ts = new TimeSpan(0, t, 0);
                dt += ts;
            }

            Console.WriteLine(dt.Hour);
            Console.WriteLine(dt.Minute);
        }
    }
}
0