Exactly three adjacent 3 in lists: Difference between revisions
→{{header|Ring}}
Thundergnat (talk | contribs) 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
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
if
cnt++
ok
next
ok
if cnt = 1
see "" + n + " true" + nl
else
|