結果

問題 No.26 シャッフルゲーム
ユーザー MiyamonYMiyamonY
提出日時 2019-09-03 02:59:34
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 389 bytes
コンパイル時間 63 ms
コンパイル使用メモリ 5,300 KB
実行使用メモリ 13,652 KB
最終ジャッジ日時 2023-08-23 10:32:35
合計ジャッジ時間 1,329 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
11,684 KB
testcase_01 WA -
testcase_02 AC 18 ms
11,704 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 19 ms
11,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (read-number)
  (string->number (read-line)))

(let ((n (read-number))
      (_ (read-number)))
  (let loop ((line (read-line)))
    (cond ((eof-object? line) (print n))
	  (else
	   (let ((tokens (map string->number (string-split line #\space))))
	     (cond ((= n (car tokens)) (set! n (cadr tokens)))
		   (=  (cadr tokens) (set! n (car tokens))))
	     (loop (read-line)))))))
0