結果
| 問題 |
No.1628 Sorting Integers (MAX of M)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-05 19:03:20 |
| 言語 | Swift (6.0.3) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 293 bytes |
| コンパイル時間 | 10,016 ms |
| コンパイル使用メモリ | 130,624 KB |
| 実行使用メモリ | 9,088 KB |
| 最終ジャッジ日時 | 2024-09-16 15:22:37 |
| 合計ジャッジ時間 | 10,391 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
}