結果
| 問題 |
No.296 n度寝
|
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-10-08 22:47:00 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 1,000 ms |
| コード長 | 412 bytes |
| コンパイル時間 | 419 ms |
| コンパイル使用メモリ | 33,984 KB |
| 実行使用メモリ | 21,760 KB |
| 最終ジャッジ日時 | 2024-10-08 22:47:02 |
| 合計ジャッジ時間 | 1,007 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 08 OCT 2024 10:47:00 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.004
ソースコード
; s = h * 60 + m + interval * (n - 1) を計算し経過分数を求めて
; s / 60 % 24 で時間が s % 60 で分がわかる
; これらを 1 行ごとに出力する
(defun main ()
(let* ((n (read))
(h (read))
(m (read))
(interval (read))
(s (+ (* 60 h) m (* interval (1- n)))))
(princ (mod (floor s 60) 24))
(terpri)
(princ (mod s 60))
(terpri)))
(main)
Common Lisp