結果
問題 | No.39 桁の数字を入れ替え |
ユーザー |
|
提出日時 | 2019-09-06 01:45:47 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 442 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 7,068 KB |
実行使用メモリ | 19,072 KB |
最終ジャッジ日時 | 2024-06-23 02:39:25 |
合計ジャッジ時間 | 2,607 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 WA * 8 |
ソースコード
(use scheme.vector) (use gauche.collection) (let* ((n (read))) (define vec (vector-map char->integer (string->vector (number->string n)))) (print (apply max #?=(let loop ((is (iota (vector-length vec)))) (cond ((null? is) '()) (else (let1 vec-copied (vector-copy vec) (vector-swap! vec-copied 0 (car is)) (cons (string->number (list->string (map integer->char vec-copied))) (loop (cdr is))))))))))