結果

問題 No.632 穴埋め門松列
ユーザー ikdikd
提出日時 2019-08-04 14:29:58
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 20 ms / 1,000 ms
コード長 544 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 13,608 KB
最終ジャッジ日時 2023-09-22 15:26:11
合計ジャッジ時間 1,154 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,608 KB
testcase_01 AC 19 ms
11,712 KB
testcase_02 AC 20 ms
13,608 KB
testcase_03 AC 18 ms
11,820 KB
testcase_04 AC 20 ms
11,612 KB
testcase_05 AC 19 ms
11,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#! /usr/bin/env gosh
(define (kado s)
  (let* ([l (string-split s " ")]
         [a (string->number (car l))]
         [b (string->number (car (cdr l)))]
         [c (string->number (car (cdr (cdr l))))])
      (and (not (= a c))
           (or (and (< a b)
                    (< c b))
               (and (> a b)
                    (> c b))))))
(let ([s (read-line)])
  (display (if (kado (regexp-replace #/\?/ s "1"))
             "1"
             ""))
  (display (if (kado (regexp-replace #/\?/ s "4"))
             "4"
             "")))
0