結果

問題 No.138 化石のバージョン
ユーザー RinRin
提出日時 2015-09-05 20:00:54
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 1,042 bytes
コンパイル時間 50 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 13,808 KB
最終ジャッジ日時 2023-09-26 08:52:57
合計ジャッジ時間 2,067 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,604 KB
testcase_01 AC 18 ms
11,708 KB
testcase_02 WA -
testcase_03 AC 18 ms
11,608 KB
testcase_04 AC 19 ms
11,832 KB
testcase_05 AC 18 ms
11,832 KB
testcase_06 AC 18 ms
11,844 KB
testcase_07 AC 18 ms
11,636 KB
testcase_08 AC 18 ms
11,608 KB
testcase_09 AC 18 ms
11,556 KB
testcase_10 AC 19 ms
11,760 KB
testcase_11 AC 18 ms
11,796 KB
testcase_12 AC 18 ms
11,720 KB
testcase_13 AC 18 ms
11,696 KB
testcase_14 AC 18 ms
13,808 KB
testcase_15 WA -
testcase_16 AC 18 ms
11,748 KB
testcase_17 AC 19 ms
11,724 KB
testcase_18 AC 19 ms
11,604 KB
testcase_19 AC 18 ms
11,792 KB
testcase_20 AC 19 ms
11,644 KB
testcase_21 AC 18 ms
11,732 KB
testcase_22 AC 19 ms
11,844 KB
testcase_23 AC 18 ms
11,712 KB
testcase_24 AC 18 ms
11,608 KB
testcase_25 AC 18 ms
11,588 KB
testcase_26 AC 19 ms
11,800 KB
testcase_27 AC 18 ms
11,640 KB
testcase_28 AC 18 ms
11,584 KB
testcase_29 AC 18 ms
11,880 KB
testcase_30 AC 18 ms
11,656 KB
testcase_31 AC 19 ms
11,836 KB
testcase_32 AC 19 ms
11,724 KB
testcase_33 AC 19 ms
11,728 KB
testcase_34 AC 18 ms
11,604 KB
testcase_35 AC 19 ms
13,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (System.out.println x)
  (begin
    (display x)
    (newline)
  )
)

(define (ver2num x)
  (let loop(
            (i 0)
            (foo 0)
            (bar '())
           )
    (if (= i (length x))
        (if (< foo 10)
            (string->number (apply string-append (reverse (cons (string-append "0" (number->string foo)) bar))))
            (string->number (apply string-append (reverse (cons (number->string foo) bar))))
        )
        (if (string=? (list->string (list (list-ref x i))) ".")
            (if (< foo 10)
                (loop (+ i 1) 0 (cons (string-append "0" (number->string foo)) bar))
                (loop (+ i 1) 0 (cons (number->string foo) bar))
            )
            (loop (+ i 1) (+ (* foo 10) (string->number (list->string (list (list-ref x i))))) bar)
        )
    )
  )
)

(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")
  )
)
0