Ответ:
Решение на Паскале
Объяснение:
var s,k,m:integer;
s1,s2:string;
imya:array [1..100] of string;
begin
readln(s1);readln(s2);
s1:=s1+' ';s2:=s2+' ';
k:=0; m:=0; s:=0;
while(pos(' ',s1)>0) do begin k:=k+1; delete(s1,1,pos(' ',s1));end;
while(pos(' ',s2)>0) do begin m:=m+1; imya[m]:=copy(s2,1,pos(' ',s2)-1);
delete(s2,1,pos(' ',s2));end;
s:=k mod m;
writeln(imya[s]);
readln; end.
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
Решение на Паскале
Объяснение:
var s,k,m:integer;
s1,s2:string;
imya:array [1..100] of string;
begin
readln(s1);readln(s2);
s1:=s1+' ';s2:=s2+' ';
k:=0; m:=0; s:=0;
while(pos(' ',s1)>0) do begin k:=k+1; delete(s1,1,pos(' ',s1));end;
while(pos(' ',s2)>0) do begin m:=m+1; imya[m]:=copy(s2,1,pos(' ',s2)-1);
delete(s2,1,pos(' ',s2));end;
s:=k mod m;
writeln(imya[s]);
readln; end.