mirror of
https://github.com/krahets/hello-algo.git
synced 2026-06-15 22:57:48 +08: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:
@@ -27,7 +27,7 @@ public class simple_hash {
|
||||
return (int) hash;
|
||||
}
|
||||
|
||||
/* XORハッシュ */
|
||||
/* XOR ハッシュ */
|
||||
static int xorHash(String key) {
|
||||
int hash = 0;
|
||||
final int MODULUS = 1000000007;
|
||||
@@ -48,18 +48,18 @@ public class simple_hash {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String key = "Hello algorithm";
|
||||
String key = "Hello アルゴリズム";
|
||||
|
||||
int hash = addHash(key);
|
||||
System.out.println("加算ハッシュ値は " + hash + " です");
|
||||
System.out.println("加算ハッシュ値は " + hash);
|
||||
|
||||
hash = mulHash(key);
|
||||
System.out.println("乗算ハッシュ値は " + hash + " です");
|
||||
System.out.println("乗算ハッシュ値は " + hash);
|
||||
|
||||
hash = xorHash(key);
|
||||
System.out.println("XORハッシュ値は " + hash + " です");
|
||||
System.out.println("XOR ハッシュ値は " + hash);
|
||||
|
||||
hash = rotHash(key);
|
||||
System.out.println("回転ハッシュ値は " + hash + " です");
|
||||
System.out.println("回転ハッシュ値は " + hash);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user