a,b,c,d:boolean;
a=1; b=0; c=0; d=0; //如果是a
if ((not (not a))and(c)and(d)and(not d))or ((not a)and(not c)and(d)and(not d))or
((not a)and(c)and(not d)and(not d))or((not a)and(not c)and(d)and(not (not d)))
then writeln('a');
a=0; b=1; c=0; d=0;//如果是b
if ((not (not a))and(c)and(d)and(not d))or ((not a)and(not c)and(d)and(not d))or
((not a)and(c)and(not d)and(not d))or((not a)and(not c)and(d)and(not (not d)))
then writeln('a'); //和上面一样,可以放到函数里面
a=0; b=0; c=1; d=0;
...
a=0; b=0; c=0; d=1;
...
这是我的想法,太久没写pascal,不太标准
输入输出格式什么样
选C 就是C