結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
Rin
|
| 提出日時 | 2015-09-05 18:04:51 |
| 言語 | Scheme (Gauche-0.9.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 650 bytes |
| コンパイル時間 | 50 ms |
| コンパイル使用メモリ | 5,120 KB |
| 実行使用メモリ | 16,000 KB |
| 最終ジャッジ日時 | 2024-07-19 03:52:25 |
| 合計ジャッジ時間 | 1,789 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 WA * 5 |
ソースコード
(define (System.out.println x)
(begin
(display x)
(newline)
)
)
(define (ver2num x)
(let loop(
(i 0)
(RetVal 0)
)
(if (= i (length x))
RetVal
(if (string=? (list->string (list (list-ref x i))) ".")
(loop (+ i 1) (* RetVal 1000))
(loop (+ i 1) (+ (* RetVal 10) (string->number (list->string (list (list-ref x i))))))
)
)
)
)
(let (
(X (string->list (symbol->string (read))))
(Y (string->list (symbol->string (read))))
)
(if (>= (ver2num X) (ver2num Y))
(System.out.println "YES")
(System.out.println "NO")
)
)
Rin