結果
| 問題 | 
                            No.1628 Sorting Integers (MAX of M)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-08-05 19:04:53 | 
| 言語 | Swift  (6.0.3)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 305 bytes | 
| コンパイル時間 | 1,170 ms | 
| コンパイル使用メモリ | 131,012 KB | 
| 実行使用メモリ | 9,472 KB | 
| 最終ジャッジ日時 | 2024-09-16 15:22:39 | 
| 合計ジャッジ時間 | 1,712 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 4 | 
| other | WA * 6 | 
ソースコード
// 入力
// 3
// 1 2 0 0 0 0 0 0 0
// 出力
// 221
let n = Int(readLine()!)!
let counts = readLine()!.split(separator: " ").map { Int($0)! }
var str = ""
for num in 0...9 {
    let count = counts[num]
    let subStr = String(repeating: String(num), count: count)
    str = subStr + str
}
print(str)