Skip to content

Instantly share code, notes, and snippets.

@fstiffo
Created December 9, 2019 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fstiffo/4d2df13c81723132db572343060f925a to your computer and use it in GitHub Desktop.
Save fstiffo/4d2df13c81723132db572343060f925a to your computer and use it in GitHub Desktop.
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