Cod sursa(job #931028)
| Utilizator | Data | 27 martie 2013 22:35:34 | |
|---|---|---|---|
| Problema | Fructe | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream in("fructe.in");
ofstream out("fructe.out");
long long n,p,b;
void work(){
in >> n;
for (int i=1; i<=n; i++){
in >> p >> b;
if (b%2==0) b=0;
else b=1;
if (b==0) out << "0" << "\n";
else if (b==1) out << "1" << "\n";
}
}
int main()
{
work();
return 0;
}
