結果

問題 No.296 n度寝
コンテスト
ユーザー 大谷祐翔
提出日時 2025-11-05 09:59:32
言語 C#
(.NET 8.0.404)
結果
AC  
実行時間 333 ms / 1,000 ms
コード長 623 bytes
コンパイル時間 6,555 ms
コンパイル使用メモリ 169,364 KB
実行使用メモリ 194,836 KB
最終ジャッジ日時 2025-11-05 09:59:48
合計ジャッジ時間 12,808 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (86 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

class Program
{
    static void Main(string[] args)
    {
        string[] inputData = Console.ReadLine()!.Split(' ');
        int sleepCount = int.Parse(inputData[0]);
        int time = int.Parse(inputData[1]);
        int minutes = int.Parse(inputData[2]);
        int interval = int.Parse(inputData[3]);

        int wakeupMinutes = (sleepCount - 1) * interval;

        DateTime wakeup = new DateTime(DateTime.Today.Year, 1, 1, time, minutes, 0);
        DateTime wakeupTime = wakeup.AddMinutes(wakeupMinutes);

        
        Console.WriteLine(wakeupTime.Hour);
        Console.WriteLine(wakeupTime.Minute);
    }
}
0