Cod sursa(job #1066789)

Utilizator gerd13David Gergely gerd13 Data 25 decembrie 2013 17:26:37
Problema Fructe Scor 100
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 << 0 << '\n' ;
        else cout << 1 << '\n' ;
    }
cin.close() ;
cout.close() ;
return 0;
}