結果

問題 No.296 n度寝
ユーザー swdamdrswdamdr
提出日時 2017-02-24 11:07:52
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 543 bytes
コンパイル時間 2,043 ms
コンパイル使用メモリ 99,660 KB
実行使用メモリ 24,828 KB
最終ジャッジ日時 2023-08-30 23:02:50
合計ジャッジ時間 3,809 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 57 ms
20,748 KB
testcase_04 AC 56 ms
20,940 KB
testcase_05 AC 56 ms
20,684 KB
testcase_06 AC 57 ms
20,716 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 57 ms
20,660 KB
testcase_10 AC 57 ms
20,760 KB
testcase_11 AC 56 ms
20,748 KB
testcase_12 AC 57 ms
20,780 KB
testcase_13 AC 57 ms
20,800 KB
testcase_14 AC 57 ms
22,796 KB
testcase_15 AC 57 ms
20,840 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;
using System.Collections.Generic;

class Program
{
    static void Main(string[] args)
    {
        string[] su = Console.ReadLine().Split();
        int cnt = int.Parse(su[0]) - 1;
        int h = int.Parse(su[1]);
        int m = int.Parse(su[2]);
        int time = int.Parse(su[3]);

        m += time * cnt;
        h += m / 60;
        m = m % 60;

        if (h >= 24)
        {
            h -= 24;
        }
        Console.WriteLine(h);
        Console.WriteLine(m);

        Console.Read();
    }
}
0