結果

問題 No.296 n度寝
ユーザー funakoshifunakoshi
提出日時 2019-06-27 14:27:34
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 93 ms / 1,000 ms
コード長 1,017 bytes
コンパイル時間 5,089 ms
コンパイル使用メモリ 100,880 KB
実行使用メモリ 22,832 KB
最終ジャッジ日時 2023-09-10 07:09:27
合計ジャッジ時間 4,128 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
22,832 KB
testcase_01 AC 63 ms
22,760 KB
testcase_02 AC 56 ms
20,684 KB
testcase_03 AC 56 ms
18,712 KB
testcase_04 AC 58 ms
20,712 KB
testcase_05 AC 57 ms
20,656 KB
testcase_06 AC 57 ms
22,664 KB
testcase_07 AC 93 ms
20,828 KB
testcase_08 AC 56 ms
20,708 KB
testcase_09 AC 57 ms
20,652 KB
testcase_10 AC 57 ms
20,680 KB
testcase_11 AC 57 ms
20,716 KB
testcase_12 AC 57 ms
20,724 KB
testcase_13 AC 57 ms
20,832 KB
testcase_14 AC 57 ms
22,792 KB
testcase_15 AC 58 ms
18,756 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.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yukicoderTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int ndone = int.Parse(input[0]);
            int hour = int.Parse(input[1]);
            int min = int.Parse(input[2]);
            int retmin = int.Parse(input[3]);
            int plusmin = int.Parse(input[3]);
            if (ndone >1)
            {
                plusmin = (ndone-1) * retmin;
            }
            else if (ndone==1)
            {
                plusmin = 0;
            }
            min = min + plusmin;
            while (min>59)
            {
                hour++;
                min -= 60;
            }
            while (hour >= 24)
            {
                hour = (24-hour)*-1;
            }
            Console.WriteLine(hour);
            Console.WriteLine(min);
        }

    }
}
0