結果

問題 No.296 n度寝
ユーザー n.yn.y
提出日時 2022-06-07 11:27:48
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 964 bytes
コンパイル時間 808 ms
コンパイル使用メモリ 106,112 KB
実行使用メモリ 24,080 KB
最終ジャッジ日時 2023-10-21 03:48:53
合計ジャッジ時間 2,071 ms
ジャッジサーバーID
(参考情報)
judge11 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 26 ms
24,080 KB
testcase_04 AC 25 ms
24,080 KB
testcase_05 AC 25 ms
24,080 KB
testcase_06 AC 25 ms
24,080 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 26 ms
24,080 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 26 ms
24,080 KB
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split(' ');

            //N度寝する
            int N = int.Parse(str[0]);
            //時
            int H = int.Parse(str[1]);
            //分
            int M = int.Parse(str[2]);
            //T分後にアラームが鳴る
            int T = int.Parse(str[3]);

            int a = 0;
            int b = 0;
            int c = 0;
            //何回で起きられるか
            a = N - 1;
            //何分後に起きるか
            b = a * T;
            //Mからbをたす 
            c = b + M;
            //cが60超えるなら
            if(c>=60)
            {
                //Hをプラス1する
                H += 1;
            }
            //表示 時間 分
            Console.WriteLine(H);
            Console.WriteLine(c);

        }
    }
}
0