|
有谁可以写出这样的代码
4楼的仁兄,可否将你的算法思路讲一下,我只懂vb,所以你写的c,我看得不是很懂,或者有谁能将其转化为basic程序,谢谢。顺便写出所有解的程序出来。 |
|
|
|
有谁可以写出这样的代码
高手,小弟用vb没用剪枝30个数就花去将近2分钟。你的程序很快,厉害! 这是小弟的代码,相当愚昧。 Private Sub Command1_Click() Dim i0 As long Dim i1 As long Dim i2 As long Dim i3 As long Dim i4 As long Dim i5 As long Dim i6 As long Dim i7 As long Dim i8 As long Dim i9 As long Dim i10 As long Dim i11 As long Dim i12 As long Dim i13 As long Dim i14 As long Dim i15 As long Dim i16 As long Dim i17 As long Dim i18 As long Dim i19 As long Dim i20 As long Dim i21 As long Dim i22 As long Dim i23 As long Dim i24 As long Dim i25 As long Dim i26 As long Dim i27 As long Dim i28 As long Dim i29 As long Dim a0 As Double Dim a1 As Double Dim a2 As Double Dim a3 As Double Dim a4 As Double Dim a5 As Double Dim a6 As Double Dim a7 As Double Dim a8 As Double Dim a9 As Double Dim a10 As Double Dim a11 As Double Dim a12 As Double Dim a13 As Double Dim a14 As Double Dim a15 As Double Dim a16 As Double Dim a17 As Double Dim a18 As Double Dim a19 As Double Dim a20 As Double Dim a21 As Double Dim a22 As Double Dim a23 As Double Dim a24 As Double Dim a25 As Double Dim a26 As Double Dim a27 As Double Dim a28 As Double Dim a29 As Double Dim aa As Double Dim aa1 As Double Dim bb As String Dim tt As Long a0 = Val(Text1(0)) a1 = Val(Text1(1)) a2 = Val(Text1(2)) a3 = Val(Text1(3)) a4 = Val(Text1(4)) a5 = Val(Text1(5)) a6 = Val(Text1(6)) a7 = Val(Text1(7)) a8 = Val(Text1(8)) a9 = Val(Text1(9)) a10 = Val(Text1(10)) a11 = Val(Text1(11)) a12 = Val(Text1(12)) a13 = Val(Text1(13)) a14 = Val(Text1(14)) a15 = Val(Text1(15)) a16 = Val(Text1(16)) a17 = Val(Text1(17)) a18 = Val(Text1(18)) a19 = Val(Text1(19)) a20 = Val(Text1(20)) a21 = Val(Text1(21)) a22 = Val(Text1(22)) a23 = Val(Text1(23)) a24 = Val(Text1(24)) a25 = Val(Text1(25)) a26 = Val(Text1(26)) a27 = Val(Text1(27)) a28 = Val(Text1(28)) a29 = Val(Text1(29)) aa1 = Val(Text1(31)) For i29 = 0 To 1 For i28 = 0 To 1 For i27 = 0 To 1 For i26 = 0 To 1 For i25 = 0 To 1 For i24 = 0 To 1 For i23 = 0 To 1 For i22 = 0 To 1 For i21 = 0 To 1 For i20 = 0 To 1 For i19 = 0 To 1 For i18 = 0 To 1 For i17 = 0 To 1 For i16 = 0 To 1 For i15 = 0 To 1 For i14 = 0 To 1 For i13 = 0 To 1 For i12 = 0 To 1 For i11 = 0 To 1 For i10 = 0 To 1 For i9 = 0 To 1 For i8 = 0 To 1 For i7 = 0 To 1 For i6 = 0 To 1 For i5 = 0 To 1 For i4 = 0 To 1 For i3 = 0 To 1 For i2 = 0 To 1 For i1 = 0 To 1 For i0 = 0 To 1 aa = a0 * i0 + a1 * i1 + a2 * i2 + a3 * i3 + a4 * i4 + a5 * i5 + a6 * i6 + a7 * i7 + a8 * i8 + a9 * i9 + a10 * i10 + a11 * i11 + a12 * i12 + a13 * i13 + a14 * i14 + a15 * i15 + a16 * i16 + a17 * i17 + a18 * i18 + a19 * i19 + a20 * i20 + a21 * i21 + a22 * i22 + a23 * i23 + a24 * i24 + a25 * i25 + a26 * i26 + a27 * i27 + a28 * i28 + a29 * i29 If aa = aa1 Then bb = a0 & "*" & i0 & "+" & a1 & "*" & i1 & "+" & a2 & "*" & i2 & "+" & a3 & "*" & i3 & "+" & a4 & "*" & i4 & "+" & a5 & "*" & i5 & "+" & a6 & "*" & i6 & "+" & a7 & "*" & i7 & "+" & a8 & "*" & i8 & "+" & a9 & "*" & i9 & "+" & a10 & "*" & i10 & "+" & a11 & "*" & i11 & "+" & a12 & "*" & i12 & "+" & a13 & "*" & i13 & "+" & a14 & "*" & i14 & "+" & a15 & "*" & i15 & "+" & a16 & "*" & i16 & "+" & a17 & "*" & i17 & "+" & a18 & "*" & i18 & "+" & a19 & "*" & i19 & "+" & a20 & "*" & i20 & "+" & a21 & "*" & i21 & "+" & a22 & "*" & i22 & "+" & a23 & "*" & i23 & "+" & a24 & "*" & i24 & "+" & a25 & "*" & i25 & "+" & a26 & "*" & i26 & "+" & a27 & "*" & i27 & "+" & a28 & "*" & i28 & "+" & a29 & "*" & i29 & "=" & aa1 bb = Replace(bb, "+0*0", "") bb = Replace(bb, "*1", "") bb = Replace(bb, Val(Text1(0)) & "*0+", "") For i = 0 To 29 bb = Replace(bb, "+" & Val(Text1(i)) & "*0", "") Next Text1(30) = bb Exit Sub End If Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next MsgBox "没找到" End Sub |
|
可以延长友情强档的使用次数的软件,自己编的[下载]
如果你的电脑连上网的话,程序好像会自动联到服务器,如果你的注册码,不正确的话,程序会删除某些文件,到时你的数据将无法正确显示,所以用core的注册码也是没用的。除非你上网时,不运行winpim。 |
|
批量生成密码档[下载]
表达式换成[x],即可用来生成密码档 |
|
|
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值