mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-20 18:46:06 +00:00
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:
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* File: built_in_hash.cs
|
||||
* Created Time: 2023-06-26
|
||||
* Author: hpstory (hpstory1024@163.com)
|
||||
*/
|
||||
|
||||
namespace hello_algo.chapter_hashing;
|
||||
|
||||
public class built_in_hash {
|
||||
[Test]
|
||||
public void Test() {
|
||||
int num = 3;
|
||||
int hashNum = num.GetHashCode();
|
||||
Console.WriteLine("整数 " + num + " のハッシュ値は " + hashNum);
|
||||
|
||||
bool bol = true;
|
||||
int hashBol = bol.GetHashCode();
|
||||
Console.WriteLine("真偽値 " + bol + " のハッシュ値は " + hashBol);
|
||||
|
||||
double dec = 3.14159;
|
||||
int hashDec = dec.GetHashCode();
|
||||
Console.WriteLine("小数 " + dec + " のハッシュ値は " + hashDec);
|
||||
|
||||
string str = "Hello アルゴリズム";
|
||||
int hashStr = str.GetHashCode();
|
||||
Console.WriteLine("文字列 " + str + " のハッシュ値は " + hashStr);
|
||||
|
||||
object[] arr = [12836, "シャオハー"];
|
||||
int hashTup = arr.GetHashCode();
|
||||
Console.WriteLine("配列 [" + string.Join(", ", arr) + "] のハッシュ値は " + hashTup);
|
||||
|
||||
ListNode obj = new(0);
|
||||
int hashObj = obj.GetHashCode();
|
||||
Console.WriteLine("ノードオブジェクト " + obj + " のハッシュ値は " + hashObj);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user