結果

問題 No.296 n度寝
ユーザー mencottonmencotton
提出日時 2018-02-18 20:00:37
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 77 ms / 1,000 ms
コード長 622 bytes
コンパイル時間 2,256 ms
コンパイル使用メモリ 102,424 KB
実行使用メモリ 25,856 KB
最終ジャッジ日時 2023-09-17 04:56:15
合計ジャッジ時間 4,103 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
21,852 KB
testcase_01 AC 66 ms
21,824 KB
testcase_02 AC 63 ms
21,960 KB
testcase_03 AC 61 ms
21,776 KB
testcase_04 AC 61 ms
21,852 KB
testcase_05 AC 61 ms
21,820 KB
testcase_06 AC 61 ms
23,860 KB
testcase_07 AC 77 ms
23,824 KB
testcase_08 AC 66 ms
25,856 KB
testcase_09 AC 61 ms
21,820 KB
testcase_10 AC 61 ms
23,820 KB
testcase_11 AC 61 ms
23,860 KB
testcase_12 AC 60 ms
19,856 KB
testcase_13 AC 61 ms
21,752 KB
testcase_14 AC 62 ms
23,952 KB
testcase_15 AC 61 ms
21,824 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 _296
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
            for (int i = 1; i < x[0]; i++)
            {
                x[2] += x[3];
                if (x[2] >= 60)
                {
                    x[1] += x[2] / 60;
                    x[2] %= 60;
                }
                if (x[1] >= 24)
                {
                    x[1] %= 24;
                }
            }
            Console.WriteLine(x[1]); Console.WriteLine(x[2]);
        }
    }
}
0