pypy-3.11.13
# 使い方: uv run hash.py -> コピペ -> Ctrl + D
# コメント・空白・改行を無視して AST ベースで md5 ハッシュする
import ast, hashlib, sys
tree = ast.parse(sys.stdin.read())
dump = ast.dump(tree)
print(hashlib.md5(dump.encode()).hexdigest()[:6], end="")
import sys
input = sys.stdin.readline
sys.setrecursionlimit(1 << 20)
# your code here...
class DSU:
def __init__(self, n):
self.par = list(range(n))
def find(self, x):
while self.par[x] != x:
self.par[x] = self.par[self.par[x]]
x = self.par[x]
return x
def unite(self, x, y):
self.par[self.find(x)] = self.find(y)
def same(self, x, y):
return self.find(x) == self.find(y)
| $n$ | $10^2$ | $10^3$ | $10^4$ | $10^5$ | $10^6$ | $10^7$ | $10^8$ | $10^9$ | $10^{10}$ |
|---|---|---|---|---|---|---|---|---|---|
| $\pi(n)$ | 25 | 168 | 1229 | 9592 | 78498 | 664579 | 5.76e+6 | 5.08e+7 | 4.55e+8 |
| $≤n$ | $10^3$ | $10^4$ | $10^5$ | $10^6$ | $10^7$ | $10^8$ | $10^9$ |
|---|---|---|---|---|---|---|---|
| $x$ | 840 | 7560 | 83160 | 720720 | 8648640 | 73513440 | 735134400 |
| $d^0(x)$ | 32 | 64 | 128 | 240 | 448 | 768 | 1344 |
| $≤n$ | $10^{10}$ | $10^{11}$ | $10^{12}$ | $10^{13}$ | $10^{14}$ | $10^{15}$ | $10^{16}$ | $10^{17}$ | $10^{18}$ |
|---|---|---|---|---|---|---|---|---|---|
| $d^0(x)$ | 2304 | 4032 | 6720 | 10752 | 17280 | 26880 | 41472 | 64512 | 103680 |
| $n$ | $2$ | $3$ | $5$ | $7$ | $11$ | $13$ | $17$ | $19$ | $23$ | $29$ |
|---|---|---|---|---|---|---|---|---|---|---|
| $n\#$ | 2 | 6 | 30 | 210 | 2310 | 30030 | 510510 | 9.70e+6 | 2.23e+8 | 6.47e+9 |
| $4!$ | $5!$ | $6!$ | $7!$ | $8!$ | $9!$ | $10!$ | $11!$ | $12!$ | $13!$ |
|---|---|---|---|---|---|---|---|---|---|
| 24 | 120 | 720 | 5040 | 40320 | 362880 | 3.63e+6 | 3.99e+7 | 4.79e+8 | 6.23e+9 |