Private Sub Command1_Click()
Dim a, b, c
a = Val(Text1)
s = 1
Do While Val(s) < Val(a)
t = s + 1
Do While Val(t) < Val(1 + 2 ^ 0.5) * s
m1 = 6 * t ^ 2 * s ^ 2 + t ^ 4 + s ^ 4 + 4 * t * s ^ 3 - 4 * t ^ 3 * s
m = Sqr(m1)
If InStr(m, ".") = 0 Then
s1 = s1 + 1
s2 = s2 & "s=" & s & "t=" & t & "m=" & m & vbCrLf
Else
s2 = s2
End If
t = t + 1
Loop
s = s + 1
Loop
If Val(s1) > 0 Then
Text2 = s2
Else
Text2 = "s=" & s & "wu jie"
End If
End Sub
Private Sub Command2_Click()
Text1 = ""
Text2 = ""
while True: try: s = 0 a = input('请输入一个数字:') for i in range(1,a): s+=1 t=s for j in range(1,(1+2**0.5)*s): t+=1 m=6 * t ** 2 * s **2 + t **4 + s ** 4 + 4 * t * s ** 3 - 4 * t **3 * s m1=m**0.5 if instr(m1,".")=0: print(s)
时空伴随者 用 python3 计算,用时几乎是一眨眼的功夫。
--------------------------------------
def test5(n=248257): if not isPrime(n): return p = n**25*2**32+1 if not isPrime(p): return q = n**24*2**32 print(pow(10, q, p)) q = n**25*2**31 print(pow(10, q, p))