fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. return 0;
  6. }
  7.  
Success #stdin #stdout 0.01s 5288KB
stdin
#include<stdio.h>
int main()
{
    int t;
    scanf("%d",&t);
    while(t>0)
    {
        char st[4];
        int ch,rep[100]={0},count=0,i,ar[4];
        scanf("%s",&st);
        for(i=0; i<4; i++)
        {
            ch=st[i];
            ar[i]=ch;
            rep[ch]++;
        }
        a=ar[0];
        b=ar[1];
        c=ar[2];
        d=ar[3];
        if(count==3)
            printf("-1\n");
        else if(count==2)
            printf("6\n");
        else if(count==1)
            printf("4\n");
        t--;
    }
}
stdout
Standard output is empty