結果
| 問題 | No.185 和風 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-29 21:00:57 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 1,000 ms |
| コード長 | 611 bytes |
| 記録 | |
| コンパイル時間 | 18 ms |
| コンパイル使用メモリ | 36,216 KB |
| 実行使用メモリ | 25,588 KB |
| 最終ジャッジ日時 | 2026-07-08 03:07:35 |
| 合計ジャッジ時間 | 909 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 08 JUL 2026 03:07:34 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.005
ソースコード
(defvar N)
(setq N (parse-integer (read-line)))
(defvar X)
(defvar Y)
(defvar temp)
(setq temp (read-line))
(setq temp (read-from-string (concatenate 'string "(" temp ")" )))
(setq X (nth 0 temp))
(setq Y (nth 1 temp))
;(print X)
;(print Y)
(defvar ans)
(setq ans (- Y X))
(if (<= ans 0) (progn (format t "-1~%") (quit)))
(loop for i from 2 to N do
(setq temp (read-line))
(setq temp (read-from-string (concatenate 'string "(" temp ")" )))
(setq X (nth 0 temp))
(setq Y (nth 1 temp))
(if (not (= (- Y X) ans)) (progn (format t "-1~%") (quit)))
)
(format t "~d~%" ans)