RosettaCodeData/Task/McNuggets-problem/R/mcnuggets-problem-1.r

3 lines
157 B
R
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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)