Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SetWorkingDir %A_ScriptDir%
- FileRead, nuStr, % A_ScriptDir "\d15.txt"
- nuA := StrSplit(nuStr, ",")
- nuAr := {}
- for i, j in nuA {
- nuAr[j] := {}
- nuAr[j]["last"] := i
- lastNum := j
- }
- Loop, 2020
- {
- i := A_Index
- if (i <= nuA.MaxIndex())
- Continue
- if !nuAr[lastNum].prev {
- num := "0"
- }
- else {
- num := nuAr[lastNum].last - nuAr[lastNum].prev
- }
- if !nuAr[num]
- nuAr[num] := {}
- nuAr[num]["prev"] := nuAr[num].last
- nuAr[num]["last"] := A_Index
- lastNum := num
- }
- Clipboard := lastNum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement