結果
| 問題 |
No.296 n度寝
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-22 11:45:08 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 1,000 ms |
| コード長 | 850 bytes |
| コンパイル時間 | 2,079 ms |
| コンパイル使用メモリ | 113,300 KB |
| 実行使用メモリ | 19,072 KB |
| 最終ジャッジ日時 | 2024-07-08 03:34:32 |
| 合計ジャッジ時間 | 3,219 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
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);
}
}
}