Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type
- mas=array[1..100] of int64;
- mtr=array[1..100] of mas;
- var
- a:mtr;
- f1,f2:text;
- i,n,m,j,kol:int64;
- fl:boolean;
- function nc(x:int64):boolean;
- begin
- nc:=true;
- while x>0 do
- begin
- if not(odd(x mod 10)) then
- begin
- nc:=false;
- break;
- end;
- x:=x div 10;
- end;
- end;
- begin
- assign(f1,'input.txt');
- assign(f2,'output.txt');
- reset(f1);
- rewrite(f2);
- while not(eof(f1)) do
- begin
- readln(f1,m,n);
- for i:=1 to m do
- begin
- for j:=1 to n do
- read(f1,a[i,j]);
- read(f1);
- end;
- fl:=true;
- for i:=1 to n do
- begin
- kol:=0;
- for j:=1 to m do
- begin
- if nc(a[j,i]) then inc(kol);
- end;
- if kol=m then begin
- write(f2,i,' ');
- fl:=false;
- end;
- end;
- if fl then writeln(f2,0)
- else writeln(f2);
- end;
- close(f1);
- close(f2);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement