Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sum := 2020
- values := [1721, 979, 366, 299, 675, 1456]
- for idx,key in values
- {
- outter := values[idx]
- loop, % values.Count() - idx
- {
- inner := values[A_Index + (idx - 1)]
- if (outter + inner = sum)
- {
- break, 2
- }
- }
- outter := inner := 0
- }
- OutputDebug, % (!outter && !inner ? "Error" : "R: " (outter * inner))
Add Comment
Please, Sign In to add comment