Cod sursa(job #2407770)
Utilizator | Data | 17 aprilie 2019 11:14:05 | |
---|---|---|---|
Problema | Fructe | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.36 kb |
#include <fstream>
using namespace std;
ifstream f("fructe.in");
ofstream g("fructe.out");
int t,b,p;
int main()
{
f>>t;
while(t--)
{
f>>p>>b;
if(((p%2)==0)&&((b%2)==0))g<<1;
else if(((p%2)==1)&&((b%2)==0))g<<0;
else if(((p%2)==0)&&((b%2)==1))g<<0;
else g<<1;
g<<endl;
}
return 0;
}