About Me

About Me : I have been working as a Software Engineer for various international companies for four years.Currently, I am working as a full stack Javascript developer in Petronas(Malaysia).

Skills

Skills • Javascript •Typescript •Python •C •Java •ReactJs • Redux • VueJs • NestJs • React Testing Library • Django• PostgreSQL • MySQL • NodeJs • Git • Docker • Jira • Visual Studio Code • Slack

সোমবার, ১০ ফেব্রুয়ারী, ২০১৪

Light oj: 1182 - Parity

LINK#

#include <stdio.h>
int main()
{
    int a[10000],i,j,t,x,num,count,m;
    scanf("%d",&t);
    for(x=1;x<=t;x++){
      scanf("%d",&num);
       j=0;count=0;
        for(i=num;0<i;i/=2){
          a[j]=i%2;
            j++;
       }
              for(m=0;m<j;m++){
                if(a[m]==1){
                 count++;
        }
       }
    if(count%2==0){
        printf("Case %d: even\n",x);
       }
    else
       printf("Case %d: odd\n",x);
    }
    return 0;
}

1 টি মন্তব্য: