結果
問題 | No.39 桁の数字を入れ替え |
ユーザー |
![]() |
提出日時 | 2025-02-10 17:12:51 |
言語 | Nim (2.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 274 bytes |
コンパイル時間 | 4,669 ms |
コンパイル使用メモリ | 67,552 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-02-10 17:12:58 |
合計ジャッジ時間 | 5,685 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 2 |
ソースコード
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 = ns[i..^1].maxIndex.succ iswap(s2[l], s2[r])breakecho s2