Last active
June 21, 2019 05:36
-
-
Save wookay/f0d908e5bf8dc95c6a9ac97e7d1b4321 to your computer and use it in GitHub Desktop.
1059472
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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