Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List := StrSplit(FileOpen("day13_input.txt","R").Read(),"`r`n")
- timestamp := List[1]
- min := {wait:999999,boat:""}
- for k, v in StrSplit(List[2],",") {
- if (v=="x")
- continue
- wait := v - Mod(timestamp,v)
- if (wait < min.wait) {
- min.wait := wait
- min.boat := v
- }
- }
- MsgBox % min.boat * min.wait
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement