結果
| 問題 | No.138 化石のバージョン |
| コンテスト | |
| ユーザー |
neko_the_shadow
|
| 提出日時 | 2016-12-18 17:47:06 |
| 言語 | Scheme (Gauche-0.9.15) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 5,000 ms |
| コード長 | 733 bytes |
| 記録 | |
| コンパイル時間 | 126 ms |
| コンパイル使用メモリ | 6,528 KB |
| 実行使用メモリ | 16,256 KB |
| 最終ジャッジ日時 | 2026-06-03 08:40:00 |
| 合計ジャッジ時間 | 2,367 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
ソースコード
(define (solve pivot-version version)
(let* ((temp-pivot (map string->number (string-split pivot-version ".")))
(temp (map string->number (string-split version ".")))
(pivot-a (car temp-pivot))
(pivot-b (cadr temp-pivot))
(pivot-c (caddr temp-pivot))
(a (car temp))
(b (cadr temp))
(c (caddr temp)))
(cond
((< pivot-a a) "NO")
((> pivot-a a) "YES")
(else
(cond
((< pivot-b b) "NO")
((> pivot-b b) "YES")
(else
(if (< pivot-c c)
"NO"
"YES")))))))
(let* ((pivot-version (read-line))
(version (read-line)))
(display (solve pivot-version version))
(newline))
neko_the_shadow