結果

問題 No.296 n度寝
ユーザー turner18_jpturner18_jp
提出日時 2017-12-15 00:21:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 280 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-05-08 10:33:00
合計ジャッジ時間 1,382 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 31 ms
10,880 KB
testcase_04 AC 31 ms
10,752 KB
testcase_05 AC 30 ms
10,752 KB
testcase_06 AC 30 ms
10,880 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 31 ms
10,880 KB
testcase_11 AC 31 ms
10,752 KB
testcase_12 WA -
testcase_13 AC 31 ms
10,880 KB
testcase_14 AC 30 ms
10,752 KB
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, h, m, t = map(int, input().split())

if n == 1:
  print(h)
  print(m)
else:
  h = h * 60
  total = (h + m + (n-1) * t)
  if total >= 1440:
    h = h % (24 * 60)
    m = total - h
    print(h)
    print(m)
  else:
    h = total // 60
    m = total % 60
    print(h)
    print(m)
0