結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2015-09-05 18:52:49 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 726 bytes |
コンパイル時間 | 31 ms |
コンパイル使用メモリ | 5,376 KB |
実行使用メモリ | 16,000 KB |
最終ジャッジ日時 | 2024-07-19 03:53:29 |
合計ジャッジ時間 | 1,707 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 WA * 6 |
ソースコード
(define (System.out.println x) (begin (display x) (newline) ) ) (define (ver2num x) (let loop( (i 0) (RetVal 0) (foo 0) ) (if (= i (length x)) (* RetVal (expt 10 (- 2 foo))) (if (string=? (list->string (list (list-ref x i))) ".") (loop (+ i 1) (* RetVal 1000 (expt 10 (- 2 foo))) 0) (loop (+ i 1) (+ (* RetVal 10) (string->number (list->string (list (list-ref x i))))) (+ foo 1)) ) ) ) ) (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") ) )