Cod sursa(job #1066787)

Utilizator gerd13David Gergely gerd13 Data 25 decembrie 2013 17:25:20
Problema Fructe Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include <fstream>

using namespace std ;

ifstream cin("fructe.in") ;
ofstream cout("fructe.out") ;
int T;
int main ()
{
    cin >> T ;
    for(int i = 1; i <= T ; ++ i)
    {
        int P, B ;
        cin >> P >> B ;
        if(B % 2 == 0)
        cout << 1 << '\n' ;
        else cout << 0 << '\n' ;
    }
cin.close() ;
cout.close() ;
return 0;
}