結果

問題 No.296 n度寝
ユーザー k-a-rgbk-a-rgb
提出日時 2023-09-22 11:45:08
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 65 ms / 1,000 ms
コード長 850 bytes
コンパイル時間 2,269 ms
コンパイル使用メモリ 103,552 KB
実行使用メモリ 25,884 KB
最終ジャッジ日時 2023-09-22 11:45:15
合計ジャッジ時間 4,467 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
21,956 KB
testcase_01 AC 59 ms
22,012 KB
testcase_02 AC 61 ms
21,872 KB
testcase_03 AC 61 ms
25,884 KB
testcase_04 AC 59 ms
23,788 KB
testcase_05 AC 59 ms
23,912 KB
testcase_06 AC 65 ms
23,924 KB
testcase_07 AC 60 ms
21,796 KB
testcase_08 AC 59 ms
21,808 KB
testcase_09 AC 60 ms
23,856 KB
testcase_10 AC 60 ms
19,748 KB
testcase_11 AC 59 ms
21,748 KB
testcase_12 AC 59 ms
23,868 KB
testcase_13 AC 59 ms
23,868 KB
testcase_14 AC 61 ms
23,844 KB
testcase_15 AC 61 ms
21,852 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;

namespace PracticeAtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
			
			
			//048ロボット
			
			
			// mm/60 をhに加算 h%24をhに格納 mm%60をmmに代入
			
			string sB = Console.ReadLine();
			string[] t = sB.Split(' ');
			int[] after = t.Select(s => int.Parse(s)).ToArray();
			
			int intA =after[0];//N度寝
			int intB =after[1];//時刻
			int intC =after[2];//分
			int intD =after[3];//間隔
			
			int sumA = 0 ;
			// A*D + C
			// mm/60 をhに加算 h%24をhに格納 mm%60をmmに代入
			//N度寝後の時刻
			intA = intA - 1;
			
			sumA = intA*intD+intC;
			intC = sumA % 60;
			intB = (sumA / 60 +intB)%24;
			
			Console.WriteLine(intB);
			Console.WriteLine(intC);
			
		}
    }
}
0