import random n=3 m=9 q=107 a=[] for i in range(0,m): ? ? b=[] ? ? for j in range(0,m): ? ? ? ? b.append(0) ? ? a.append(b) for i in range(0,n): ? ? for j in range(n,m): ? ? ? ? a[i][j]=random.choice(range(q))*11111111111111 for i in range(0,n): ? ? a[i][i]=1 for i in range(n,m): ? ? a[i][i]=q*11111111111111 for i in range(0,m): ? ? for j in range(0,m): ? ? ? ? print(a[i][j],end=' ') ? ? print() A=matrix(a) A.LLL()
import abc
q=int(input())
M=[]
n=int(input())
tp=input()
a=tp.split()
L=int(input())
print(q)
print(a)
a.append(1/(1<<(L+1)))
for i in range(0,n):
b=[]
for j in range(0,n+1):
if i==j:
b.append(q)
pass
else :
b.append(0)
pass
pass
M.append(b)
pass
M.append(a)
for i in range(0,n+1):
for j in range(0,n+1):
print(M[i][j],end=' ')
pass
print()
pass
|