結果
問題 | No.39 桁の数字を入れ替え |
ユーザー |
![]() |
提出日時 | 2025-02-11 02:04:23 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 316 bytes |
コンパイル時間 | 4,773 ms |
コンパイル使用メモリ | 67,660 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-02-11 02:04:29 |
合計ジャッジ時間 | 5,542 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
import sequtils, strutilslets1 = stdin.readLinens = s1.toSeq.mapIt ($it).parseIntvarl, r: ints2 = s1for i in 0 ..< s1.high:let max = (ns[i..^1]).maxif max == ns[i]: continuel = ir = i.succfor j in i.succ .. s1.high:if ns[j] >= ns[r]: r = jswap(s2[l], s2[r])breakecho s2