Created
December 9, 2019 14:31
-
-
Save fstiffo/4d2df13c81723132db572343060f925a to your computer and use it in GitHub Desktop.
This file contains 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
namespace NSMain; | |
function fuel(mass: Int) : Int | |
requires mass > 0; | |
{ | |
return (mass / 3) - 2; | |
} | |
entrypoint function main(): [Int, Int] { | |
var solution1 = fuel(120); | |
var solution2 = 0; | |
return [solution1, solution2]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment