Little Gaurav and Sequence

  • + 0 comments

    int main(){ long long int t,n,p; scanf("%lld",&t); while(t--){ scanf("%lld",&n); if(n%2!=0){ printf("0\n"); }else if(n==2){ printf("6\n"); } else{ p=log(n)/log(2); printf("%lld\n",(p*6)%10); } } }