var n, k: integer;begin; read(n); k := -10000; while(k < 0) do k := k - 1; writeln('Min: k = ', (k + 1) div 3, ', 3*k = ', k + 1); k := n div 3; if 3 * k >= n then k := k - 1; writeln('Max: k = ', k, ', 3*k = ', 3 * k);end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var
n, k: integer;
begin;
read(n);
k := -10000;
while(k < 0) do
k := k - 1;
writeln('Min: k = ', (k + 1) div 3, ', 3*k = ', k + 1);
k := n div 3;
if 3 * k >= n then k := k - 1;
writeln('Max: k = ', k, ', 3*k = ', 3 * k);
end.
Verified answer
Program z1;Var k:integer;
Begin
Readln(k);
Writeln('1');
End.