Cod sursa(job #675996)

Utilizator Andrei.XweCobzaru Adrian-Andrei Andrei.Xwe Data 8 februarie 2012 15:50:31
Problema Fructe Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
using namespace std;
#include<fstream>
int main()
{
	long T,P,B,i;
	ifstream fcin("fructe.in");
	ofstream fcout("fructe.out");
	fcin>>T;
	for(i=1;i<=T;i++)
	{
		fcin>>P>>B;
		if (B%2==0)
			fcout<<0<<"\n";
		else
			fcout<<1<<"\n";
	}
	fcin.close();
	fcout.close();
	return 0;
}