Re-translate the Japanese version (#1871)

* Retranslate Japanese docs with GPT-5.4

* Retranslate Japanese code with GPT-5.4
This commit is contained in:
Yudong Jin
2026-03-30 07:30:15 +08:00
committed by GitHub
parent fe6443235b
commit d7b2277d2b
1444 changed files with 83312 additions and 8363 deletions
@@ -0,0 +1,51 @@
/**
* File: hash_map.swift
* Created Time: 2023-01-16
* Author: nuomi1 (nuomi1@qq.com)
*/
import utils
@main
enum HashMap {
/* Driver Code */
static func main() {
/* */
var map: [Int: String] = [:]
/* */
// (key, value)
map[12836] = "シャオハー"
map[15937] = "シャオルオ"
map[16750] = "シャオスワン"
map[13276] = "シャオファー"
map[10583] = "シャオヤー"
print("\n追加完了後のハッシュテーブルは\nKey -> Value")
PrintUtil.printHashMap(map: map)
/* */
// key value
let name = map[15937]!
print("\n学籍番号 15937 を入力すると、名前 \(name) が見つかりました")
/* */
// (key, value)
map.removeValue(forKey: 10583)
print("\n10583 を削除後のハッシュテーブルは\nKey -> Value")
PrintUtil.printHashMap(map: map)
/* */
print("\nキーと値の組 Key->Value を走査")
for (key, value) in map {
print("\(key) -> \(value)")
}
print("\nキー Key を個別に走査")
for key in map.keys {
print(key)
}
print("\n値 Value を個別に走査")
for value in map.values {
print(value)
}
}
}