結果

問題 No.70 睡眠の重要性!
ユーザー mondomondo
提出日時 2019-08-06 00:29:25
言語 PHP
(8.3.4)
結果
AC  
実行時間 7 ms / 5,000 ms
コード長 432 bytes
コンパイル時間 832 ms
コンパイル使用メモリ 11,916 KB
実行使用メモリ 12,392 KB
最終ジャッジ日時 2023-09-25 17:36:33
合計ジャッジ時間 1,414 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,392 KB
testcase_01 AC 7 ms
12,356 KB
testcase_02 AC 7 ms
12,336 KB
testcase_03 AC 7 ms
12,368 KB
testcase_04 AC 7 ms
12,328 KB
testcase_05 AC 7 ms
12,276 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$count = trim(fgets(STDIN));
$array = array();
for ($i = 0; $i < $count; $i++) {
     $array[] = explode(" ", trim(fgets(STDIN)));
}
$diff = array();
for ($i=0; $i<$count; $i++){
        $diff[] = strtotime($array[$i][1]) - strtotime($array[$i][0]);
}
$newdiff = array();
$sum = 0;
foreach ($diff as $value){
    $hour = gmdate("h", $value);
    $minutes = gmdate("i", $value);
    $sum += $hour * 60 + $minutes;
}
echo $sum;
0