RosettaCodeData/Task/McNuggets-problem/R/mcnuggets-problem-1.r
2023-07-01 13:44:08 -04:00

2 lines
157 B
R

allInputs <- expand.grid(x = 0:(100 %/% 6), y = 0:(100 %/% 9), z = 0:(100 %/% 20))
mcNuggets <- do.call(function(x, y, z) 6 * x + 9 * y + 20 * z, allInputs)