Dim a() As String Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Do While Not EOF(1) Line Input #1, n a = Split(n) Call b("") Loop Close Close End End Sub Sub b(x) If Len(x) = (UBound(a) + 1) Then Print #2, x Else For i = 0 To (UBound(a)) If InStr(x, a(i)) = 0 Then Call b(x & a(i)) Next End If End Sub
Dim a() As String Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Line Input #1, n a = Split(n) Call s("") Close #2 Close #1 End End Sub Sub s(x) If Len(x) = (UBound(a) + 1) Then Print #2, x Else For i = 0 To UBound(a) If InStr(x, a(i)) = 0 Then Call s(x & a(i)) Next i End If End Sub
Dim a() As String Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Line Input #1, x a = Split(x) Call c("") Close #2 Close #1 End End Sub
Sub c(b) If Len(b) = (UBound(a) + 1) Then Print #2, b Else For i = 0 To UBound(a) If InStr(b, a(i)) = 0 Then Call c(b & a(i)) Next i End If End Sub
Dim a() As String
回覆刪除Private Sub Form_Load()
Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Do While Not EOF(1)
Line Input #1, n
a = Split(n)
Call b("")
Loop
Close
Close
End
End Sub
Sub b(x)
If Len(x) = (UBound(a) + 1) Then
Print #2, x
Else
For i = 0 To (UBound(a))
If InStr(x, a(i)) = 0 Then Call b(x & a(i))
Next
End If
End Sub
Dim a() As String
回覆刪除Private Sub Form_Load()
Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Line Input #1, n
a = Split(n)
Call s("")
Close #2
Close #1
End
End Sub
Sub s(x)
If Len(x) = (UBound(a) + 1) Then
Print #2, x
Else
For i = 0 To UBound(a)
If InStr(x, a(i)) = 0 Then Call s(x & a(i))
Next i
End If
End Sub
Dim a() As String
回覆刪除Private Sub Form_Load()
Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Line Input #1, x
a = Split(x)
Call c("")
Close #2
Close #1
End
End Sub
Sub c(b)
If Len(b) = (UBound(a) + 1) Then
Print #2, b
Else
For i = 0 To UBound(a)
If InStr(b, a(i)) = 0 Then Call c(b & a(i))
Next i
End If
End Sub