Exactly three adjacent 3 in lists: Difference between revisions

m (→‎{{header|Ring}}: mark incorrect for the fifth time. Do you even test your answers at all?)
Line 160:
list[3] = [1,4,3,6,7,3,8,3,2]
list[4] = [1,2,3,4,5,6,7,8,9]
//list[5] = [4,6,8,7,2,3,3,3,1]
list[5] = [9,3,3,3,2,1,7,8,3]
 
for n = 1 to 5
good = 0
cnt = 0
flagfor p = 01 to 9
for m = 1 toif list[n][p] = 73
cntgood++
if list[n][m] = 3 and list[n][m+1] = 3 and list[n][m+2] = 3 and list[n][m+3] != 3
flag = 1
cnt++
ok
next
if flaggood = 1 and cnt = 13
for m = 1 to 7 flag = 1
if list[n][m] = 3 and list[n][m+1] = 3 and list[n][m+2] = 3 and list[n][m+3] != 3
cnt++
ok
next
ok
if cnt = 1
see "" + n + " true" + nl
else
2,468

edits