Created
December 11, 2016 08:00
-
-
Save Kanol/276ef4f1a98520b0d4e47175f880d911 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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