結果

問題 No.296 n度寝
ユーザー funakoshifunakoshi
提出日時 2019-06-27 14:21:15
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,014 bytes
コンパイル時間 3,585 ms
コンパイル使用メモリ 101,576 KB
実行使用メモリ 22,828 KB
最終ジャッジ日時 2023-09-10 06:47:32
合計ジャッジ時間 4,066 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 58 ms
20,740 KB
testcase_04 AC 57 ms
20,676 KB
testcase_05 AC 58 ms
20,676 KB
testcase_06 AC 58 ms
22,820 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 57 ms
20,740 KB
testcase_10 AC 57 ms
20,772 KB
testcase_11 AC 58 ms
20,884 KB
testcase_12 AC 58 ms
20,944 KB
testcase_13 AC 58 ms
22,788 KB
testcase_14 AC 59 ms
22,796 KB
testcase_15 AC 58 ms
22,820 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;
            }
            if (hour >= 24)
            {
                hour = (24-hour)*-1;
            }
            Console.WriteLine(hour);
            Console.WriteLine(min);
        }

    }
}
0