Language: C

double n,p[333][333][333]={1.};c[4];double f(i,j,k){return~i&~j&~k?p[i][j][k]?:(p[i][j][k]=(i*f(i-1,j,k)+j*f(i+1,j-1,k)+k*f(i,j+1,k-1)+n)/(i+j+k)):0;}main(){for(;~scanf("%d",c);)!n?n=*c:c[*c]++;printf("%.9f",f(c[1],c[2],c[3])-1);}

Compiler output:
main.c:1:32: warning: data definition has no type or storage class
    1 | double n,p[333][333][333]={1.};c[4];double f(i,j,k){return~i&~j&~k?p[i][j][k]?:(p[i][j][k]=(i*f(i-1,j,k)+j*f(i+1,j-1,k)+k*f(i,j+1,k-1)+n)/(i+j+k)):0;}main(){for(;~scanf("%d",c);)!n?n=*c:c[*c]++;printf("%.9f",f(c[1],c[2],c[3])-1);}
      |                                ^
main.c:1:32: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c: In function 'f':
main.c:1:44: error: type of 'i' defaults to 'int' [-Wimplicit-int]
    1 | double n,p[333][333][333]={1.};c[4];double f(i,j,k){return~i&~j&~k?p[i][j][k]?:(p[i][j][k]=(i*f(i-1,j,k)+j*f(i+1,j-1,k)+k*f(i,j+1,k-1)+n)/(i+j+k)):0;}main(){for(;~scanf("%d",c);)!n?n=*c:c[*c]++;printf("%.9f",f(c[1],c[2],c[3])-1);}
      |                                            ^
main.c:1:44: error: type of 'j' defaults to 'int' [-Wimplicit-int]
main.c:1:44: error: type of 'k' defaults to 'int' [-Wimplicit-int]
main.c: At top level:
main.c:1:151: error: return type defaults to 'int' [-Wimplicit-int]
    1 | double n,p[333][333][333]={1.};c[4];double f(i,j,k){return~i&~j&~k?p[i][j][k]?:(p[i][j][k]=(i*f(i-1,j,k)+j*f(i+1,j-1,k)+k*f(i,j+1,k-1)+n)/(i+j+k)):0;}main(){for(;~scanf("%d",c);)!n?n=*c:c[*c]++;printf("%.9f",f(c[1],c[2],c[3])-1);}
      |                                                                                                                                                       ^~~~
main.c: In function 'main':
main.c:1:164: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | double n,p[333][333][333]={1.};c[4];double f(i,j,k){return~i&~j&~k?p[i][j][k]?:(p[i][j][k]=(i*f(i-1,j,k)+j*f(i+1,j-1,k)+k*f(i,j+1,k-1)+n)/(i+j+k)):0;}main(){for(;~scanf("%d",c);)!n?n=*c:c[*c]++;printf("%.9f",f(c[1],c[2],c[3])-1);}
      |                                                                                                                                                                    ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | double n,p[333][333][333]={1.};c[4];double f(i,j,k){return~i&~j&~k?p[i][j][k]?:(p[i][j][k]=(i*f(i-1,j,k)+j*f(i+1,j-1,k)+k*f(i,j+1,k-1)+n)/(i+j+k)):0;}main(){for(;~scanf("%d",c);)!n?n=*c:c[*c]++;printf("%.9f",f(c[1],c[2],c[3])-1);}
main.c:1:164: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | double n,p[333][333][333]={1.};c[4];double f(i,j,k){return~i&~j&~k?p[i][j][k]?:(p[i][j][k]=(i*f(i-1,j,k)+j*f(i+1,j-1,k)+k*f(i,j+1,k-1)+n)/(i+j+k)):0;}main(){for(;~scanf("%d",c);)!n?n=*c:c[*c]++;printf("%.9f",f(c[1],c[2],c[3])-1);}
      |                                                                                                                                                                    ^~~~~
main.c:1:164: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:195: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | double n,p[333][333][333]={1.};c[4];double f(i,j,k){return~i&~j&~k?p[i][j][k]?:(p[i][j][k]=(i*f(i-1,j,k)+j*f(i+1,j-1,k)+k*f(i,j+1,k-1)+n)/(i+j+k)):0;}main(){for(;~scanf("%d",c);)!n?n=*c:c[*c]++;printf("%.9f",f(c[1],c[2],c[3])-1);}
      |                                                                                                                                                                                                   ^~~~~~
main.c:1:195: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:195: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:195: note: include '<stdio.h>' or provide a declaration of 'printf'