Skip to content

Instantly share code, notes, and snippets.

@wookay
Last active June 21, 2019 05:36
Show Gist options
  • Save wookay/f0d908e5bf8dc95c6a9ac97e7d1b4321 to your computer and use it in GitHub Desktop.
Save wookay/f0d908e5bf8dc95c6a9ac97e7d1b4321 to your computer and use it in GitHub Desktop.
1059472
# https://gall.dcinside.com/board/view/?id=programming&no=1059472
using JuMP, GLPK
model = Model(with_optimizer(GLPK.Optimizer))
@variable(model, πŸ› )
@variable(model, 🌺 )
@variable(model, ⏱ )
@constraint(model, πŸ› + 🌺 + πŸ› + 🌺 + πŸ› + 🌺 == 21)
@constraint(model, ⏱ + ⏱ + πŸ› + 🌺 == 19)
@constraint(model, 🌺 + ⏱ + πŸ› + 🌺 == 15)
optimize!(model)
value.([πŸ› 🌺 ⏱])
# 5 2 6
value(6 + 2🌺 * 5 )
# 26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment