Skip to content

Instantly share code, notes, and snippets.

@E869120
Created February 24, 2024 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save E869120/8a377040752ce1c98fb0fb7bca2b03ff to your computer and use it in GitHub Desktop.
Save E869120/8a377040752ce1c98fb0fb7bca2b03ff to your computer and use it in GitHub Desktop.
import numpy as np
np.random.seed(seed=0)
N = 45
A = [0] * 45
B = [0] * 45
# 乱数生成 (A)
for i in range(N):
for j in range(18):
A[i] *= 10
if j == 0:
A[i] += np.random.randint(1, 10)
else:
A[i] += np.random.randint(0, 10)
# 乱数生成 (B)
for i in range(N):
for j in range(18):
B[i] *= 10
if j == 0:
B[i] += np.random.randint(1, 10)
else:
B[i] += np.random.randint(0, 10)
# 出力
print(N)
for i in range(N):
print(str(A[i]) + " " + str(B[i]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment