With Ada.Text_IO; Use Ada.Text_IO;
With Ada.Integer_Text_IO; Use Ada.Integer_Text_IO;
procedure Program is
type Binary_array is array(0..99) of Integer;
type Decimal_array is array(0..33) of Integer;
bin: Binary_array;
dec: Decimal_array;
dec_len: Integer := 0;
num: Integer := 0;
char: String := "A";
begin
-- your code goes here
for i in 0..99 loop
get(char);
if char = "0" then
bin(i) := 0;
else
bin(i) := 1;
end if;
end loop;
for i in 0..33 loop
num := 0;
for j in 0..99 loop
num := num * 2;
num := num + bin(j);
bin(j) := num / 10;
num := num rem 10;
end loop;
dec(i) := num;
end loop;
for i in 0..33 loop
put(dec(33 - i), 0);
end loop;
end Program;
V2l0aCBBZGEuVGV4dF9JTzsgVXNlIEFkYS5UZXh0X0lPOyAgCldpdGggQWRhLkludGVnZXJfVGV4dF9JTzsgVXNlIEFkYS5JbnRlZ2VyX1RleHRfSU87Cgpwcm9jZWR1cmUgUHJvZ3JhbSBpcwogICB0eXBlIEJpbmFyeV9hcnJheSBpcyBhcnJheSgwLi45OSkgb2YgSW50ZWdlcjsKICAgdHlwZSBEZWNpbWFsX2FycmF5IGlzIGFycmF5KDAuLjMzKSBvZiBJbnRlZ2VyOwogICBiaW46IEJpbmFyeV9hcnJheTsKICAgZGVjOiBEZWNpbWFsX2FycmF5OwogICBkZWNfbGVuOiBJbnRlZ2VyIDo9IDA7CiAgIG51bTogSW50ZWdlciA6PSAwOwogICBjaGFyOiBTdHJpbmcgOj0gIkEiOwpiZWdpbgogIC0tIHlvdXIgY29kZSBnb2VzIGhlcmUKICBmb3IgaSBpbiAwLi45OSBsb29wCiAgICAgZ2V0KGNoYXIpOwogICAgIGlmIGNoYXIgPSAiMCIgdGhlbgogICAgICAgICBiaW4oaSkgOj0gMDsKICAgICAgZWxzZQogICAgICAgICBiaW4oaSkgOj0gMTsKICAgICAgZW5kIGlmOwogIGVuZCBsb29wOwogIAogIGZvciBpIGluIDAuLjMzIGxvb3AKICAgICBudW0gOj0gMDsKICAgICBmb3IgaiBpbiAwLi45OSBsb29wCiAgICAgICAgbnVtIDo9IG51bSAqIDI7CiAgICAgICAgbnVtIDo9IG51bSArIGJpbihqKTsKICAgICAgICBiaW4oaikgOj0gbnVtIC8gMTA7CiAgICAgICAgbnVtIDo9IG51bSByZW0gMTA7CiAgICAgZW5kIGxvb3A7CiAgICAgCiAgICAgZGVjKGkpIDo9IG51bTsKICBlbmQgbG9vcDsKICAKICBmb3IgaSBpbiAwLi4zMyBsb29wCiAgICAgcHV0KGRlYygzMyAtIGkpLCAwKTsKICBlbmQgbG9vcDsKZW5kIFByb2dyYW07