結果
問題 | No.651 E869120 and Driving |
ユーザー |
|
提出日時 | 2019-01-22 14:41:59 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 28 ms / 1,000 ms |
コード長 | 478 bytes |
コンパイル時間 | 795 ms |
コンパイル使用メモリ | 108,572 KB |
実行使用メモリ | 27,060 KB |
最終ジャッジ日時 | 2024-09-22 09:06:10 |
合計ジャッジ時間 | 1,531 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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); } }