結果

問題 No.651 E869120 and Driving
ユーザー CroweaCrowea
提出日時 2019-01-22 14:41:59
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 28 ms / 1,000 ms
コード長 478 bytes
コンパイル時間 3,495 ms
コンパイル使用メモリ 108,772 KB
実行使用メモリ 25,116 KB
最終ジャッジ日時 2023-10-22 08:04:09
合計ジャッジ時間 1,766 ms
ジャッジサーバーID
(参考情報)
judge11 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
25,116 KB
testcase_01 AC 28 ms
25,116 KB
testcase_02 AC 27 ms
25,116 KB
testcase_03 AC 28 ms
25,116 KB
testcase_04 AC 28 ms
25,116 KB
testcase_05 AC 27 ms
25,116 KB
testcase_06 AC 27 ms
25,116 KB
testcase_07 AC 27 ms
25,116 KB
testcase_08 AC 27 ms
25,116 KB
testcase_09 AC 27 ms
25,116 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program
{
    const int speed = 100;
    const int departTime = 10;
    static void Main(string[] args)
    {
        var dist = double.Parse(Console.ReadLine());
        string[] elapsed = (dist / speed).ToString().Split('.');
        int hour = departTime + int.Parse(elapsed[0]);
        int min;
        if (elapsed.Length <= 1) min = 0;
        else min = (int.Parse(elapsed[1]) * 60) / 10;
        Console.WriteLine("{0}:{1:D2}", hour, min);
    }
}

0