結果
| 問題 | No.652 E869120 and TimeZone |
| コンテスト | |
| ユーザー |
mencotton
|
| 提出日時 | 2018-04-24 17:13:27 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 1,000 ms |
| コード長 | 663 bytes |
| 記録 | |
| コンパイル時間 | 841 ms |
| コンパイル使用メモリ | 111,960 KB |
| 実行使用メモリ | 26,388 KB |
| 最終ジャッジ日時 | 2024-06-11 12:24:55 |
| 合計ジャッジ時間 | 2,347 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 30 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
namespace _652
{
class Program
{
static void Main(string[] args)
{
string[] s = Console.ReadLine().Split();
var x = double.Parse(s[2].Substring(3, s[2].Length - 3));
double a = 60 * x + 900;
if (1 - (x % 1) < 0.001) a++;
double time = int.Parse(s[0]) * 60 + int.Parse(s[1]); time += a;
double hour = time / 60 % 24;
if (hour < 10) Console.Write(0);
Console.Write((int)hour + ":");
double minute = time % 60;
if (minute < 10) Console.Write(0);
Console.WriteLine((int)minute);
}
}
}
mencotton