Cod sursa(job #1337311)

Utilizator serban_andreiserban andrei-catalin serban_andrei Data 8 februarie 2015 20:49:00
Problema Fructe Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.3 kb
#include <fstream>
using namespace std;
int main()
{
    ifstream f("fructe.in");
    ofstream g("fructe.out");
    int t,i,p,b;
    f>>t;
    for(i=1;i<=t;i++)
    {
        f>>p>>b;
        if(b%2==0)
            g<<0<<endl;
        else
            g<<1<<endl;
    }
    return 0;
}