uses math;
var
a: integer;
begin
readln(a);
a := abs(a);
while a >= 10 do
a := a div 10;
if (a mod 2 = 0) then
writeln(2)
else
writeln(1);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
uses math;
var
a: integer;
begin
readln(a);
a := abs(a);
while a >= 10 do
a := a div 10;
if (a mod 2 = 0) then
writeln(2)
else
writeln(1);
end.