結果

問題 No.296 n度寝
ユーザー mondomondo
提出日時 2019-07-25 16:26:24
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 483 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 12,112 KB
実行使用メモリ 12,344 KB
最終ジャッジ日時 2023-09-15 00:00:52
合計ジャッジ時間 1,145 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 7 ms
12,272 KB
testcase_05 WA -
testcase_06 AC 6 ms
12,252 KB
testcase_07 AC 7 ms
12,304 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 7 ms
12,232 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 7 ms
12,312 KB
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$array = explode(" ", trim(fgets(STDIN)));
$n = $array[0];
$hour = $array[1];
$minutes = $array[2];
$snooze = $array[3];
// 0時0分を基準とし時間を分で表す
$time = $hour * 60 + $minutes;
// 0時0分を基準とし起床した時間
$up = $time + $snooze * ($n - 1);
// 時間を換算
$time2 = (floor($time/60))%24;
$minutes2 = $time%60;
echo $time2."\n".$minutes2;

// 時間:分を60で割った商の整数部分
// 分:分を60で割ったあまり
0