Skip to content

Instantly share code, notes, and snippets.

@vznvzn
Created November 15, 2018 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vznvzn/cc115c553ff338a7fba986f2f9539269 to your computer and use it in GitHub Desktop.
Save vznvzn/cc115c553ff338a7fba986f2f9539269 to your computer and use it in GitHub Desktop.
c = ARGV[0].to_i
n = 0
puts("#{n} #{c * 2} 0")
c.times \
{
puts("#{n} #{n + 1} 1")
puts("#{n + 1} #{n + 2} 1")
puts("#{n + 1} #{n + 2} 2")
n += 2
}
puts("#{n} #{n + 1} 2")
puts(n += 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment