Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FileRead, Input, 10.txt
- x := 1, cycle := 1, total := 0, str := ""
- for i, line in StrSplit(Input, ["`r`n", A_Space]) {
- addx := 0
- if line is number
- addx := line
- ;2
- if (Mod(cycle-1, 40) = 0)
- str .= "`r`n"
- if (Mod(cycle-1, 40) >= x-1) and (Mod(cycle-1, 40) <= x+1)
- str .= "█"
- else
- str .= " "
- cycle += 1
- x += addx
- ;1
- if (Mod(cycle+20, 40) = 0)
- total += cycle * x
- }
- ;1
- MsgBox, % total
- ;2
- Clipboard := str
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement