Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- arr = [1,12,2,3,1,1,2,3,1,3,4,3,1,5,0,3,2,1,10,19,1,19,5,23,2,23,6,27,1,27,5,31,2,6,31,35,1,5,35,39,2,39,9,43,1,43,5,47,1,10,47,51,1,51,6,55,1,55,10,59,1,59,6,63,2,13,63,67,1,9,67,71,2,6,71,75,1,5,75,79,1,9,79,83,2,6,83,87,1,5,87,91,2,6,91,95,2,95,9,99,1,99,6,103,1,103,13,107,2,13,107,111,2,111,10,115,1,115,6,119,1,6,119,123,2,6,123,127,1,127,5,131,2,131,6,135,1,135,2,139,1,139,9,0,99,2,14,0,0]
- list1=[]
- for i in range(0,99):
- list1.append(i)
- list2=[]
- for i in range(0,99):
- list2.append(i)
- noun= 0
- verb= 0
- opcode = 0
- iterCounter = 0
- while arr[0] != 19690720:
- iterCounter+=1
- print(arr[0])
- if iterCounter > 99:
- random.shuffle(list1)
- random.shuffle(list2)
- iterCounter=0
- for (a, b) in zip(list1, list2):
- noun = a
- verb = b
- arr[opcode+4] = a
- arr[opcode+4+4] = b
- while arr[opcode] != 99:
- if arr[opcode] == 1:
- arr[arr[opcode+3]] = arr[arr[opcode+1]] + arr[arr[opcode+2]]
- opcode+=4
- if arr[opcode] == 2 and firstInteger == False:
- arr[arr[opcode+3]] = arr[arr[opcode+1]] * arr[arr[opcode+2]]
- opcode+=4
- if arr[opcode] == 99:
- print("Ended")
- print(arr)
- print(noun)
- print(verb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement