結果
問題 | No.296 n度寝 |
ユーザー |
![]() |
提出日時 | 2018-11-03 17:18:40 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 26 ms / 1,000 ms |
コード長 | 721 bytes |
コンパイル時間 | 954 ms |
コンパイル使用メモリ | 106,628 KB |
実行使用メモリ | 25,936 KB |
最終ジャッジ日時 | 2024-11-20 19:21:58 |
合計ジャッジ時間 | 2,376 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; class Program { static void Main(string[] args) { //入力 string s = Console.ReadLine(); string[] t = s.Split(' '); //数字の割り当て int N = int.Parse(t[0]); int H = int.Parse(t[1]); //時間 int M = int.Parse(t[2]); //分 int T = int.Parse(t[3]); //アラームの間隔 //まずは分の値を加える M += T * (N - 1); //分の値から時間を取り出す H += M / 60; //分の値を60以下に設定する M %= 60; //時間の値を24以下に設定する H %= 24; //出力 Console.WriteLine(H); Console.WriteLine(M); } }