結果

問題 No.651 E869120 and Driving
ユーザー mondomondo
提出日時 2019-08-06 10:03:16
言語 PHP
(8.3.4)
結果
AC  
実行時間 8 ms / 1,000 ms
コード長 300 bytes
コンパイル時間 465 ms
コンパイル使用メモリ 12,080 KB
実行使用メモリ 12,244 KB
最終ジャッジ日時 2023-09-25 17:38:04
合計ジャッジ時間 1,225 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,192 KB
testcase_01 AC 8 ms
12,124 KB
testcase_02 AC 7 ms
12,228 KB
testcase_03 AC 7 ms
12,156 KB
testcase_04 AC 8 ms
12,156 KB
testcase_05 AC 7 ms
12,192 KB
testcase_06 AC 7 ms
12,176 KB
testcase_07 AC 7 ms
12,132 KB
testcase_08 AC 8 ms
12,168 KB
testcase_09 AC 7 ms
12,244 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$distance = (int)trim(fgets(STDIN));
$speed = 100;
$time = (int)$distance *60 / (int)$speed;
$minutes = $time % 60;
if ($time > 60) {
    if ($time % 60 == 0){
        $minutes = 0;
    } else {
        $minutes = $time % 60;
    }
}
echo (floor($time / 60) + 10).":".sprintf("%02s", $minutes);
0