Skip to content

Instantly share code, notes, and snippets.

@Kanol
Created December 11, 2016 08:00
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 Kanol/276ef4f1a98520b0d4e47175f880d911 to your computer and use it in GitHub Desktop.
Save Kanol/276ef4f1a98520b0d4e47175f880d911 to your computer and use it in GitHub Desktop.
program mushrooms;
var input:integer;
output1, output2, output3:real;
begin
readln(input);
if (input mod 2 = 0) then begin
output1 := trunc(input/3.3);
output2 := output1;
end
else begin
output1 := trunc((input-1)/3.3);
output2 := output1+1;
end;
output3 := trunc((output1 + output2)/1.5);
write(output3, ' ', output2, ' ', output1);
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment