結果
問題 | No.39 桁の数字を入れ替え |
ユーザー | MiyamonY |
提出日時 | 2019-09-06 01:45:47 |
言語 | Scheme (Gauche-0.9.14) |
結果 |
WA
|
実行時間 | - |
コード長 | 442 bytes |
コンパイル時間 | 55 ms |
コンパイル使用メモリ | 5,212 KB |
実行使用メモリ | 16,592 KB |
最終ジャッジ日時 | 2023-09-05 06:16:59 |
合計ジャッジ時間 | 2,508 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 30 ms
14,440 KB |
testcase_01 | AC | 30 ms
14,460 KB |
testcase_02 | AC | 31 ms
14,372 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 31 ms
14,584 KB |
testcase_08 | AC | 30 ms
14,380 KB |
testcase_09 | AC | 30 ms
14,364 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 30 ms
14,440 KB |
testcase_15 | AC | 30 ms
14,420 KB |
testcase_16 | AC | 31 ms
14,596 KB |
testcase_17 | AC | 30 ms
14,432 KB |
testcase_18 | AC | 30 ms
14,356 KB |
ソースコード
(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))))))))))