program T01 implicit none integer::a,b,c,d d=0 do a=1,12 do b=0,4 do c=0,10 if(b==0.and.c==0)then cycle else if(b==3.and.c>1)then cycle else if(a==2.or.a==4.or.a==6.or.a==9.or.a==11.and.b==3.and.c>0)then cycle else if(a==b+c)then d=d+1 end if end do end do end do write(*,*)d end program