Cod sursa(job #215826)

Utilizator firewizardLucian Dobre firewizard Data 21 octombrie 2008 13:43:19
Problema Fructe Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.34 kb
#include <stdio.h>
int p,b,t;
int main()
{
    freopen ("fructe.in","r",stdin);
    freopen ("fructe.out","w",stdout);
    scanf("%ld\n",&t);
    for (;t;--t){
        scanf("%ld %ld\n",&p,&b);
        if (p==b)printf("%ld\n",p%2);
           else if((p+b)%2)printf("0\n");
                else printf("1\n");
        }
    return 0;
}