Cod sursa(job #985189)

Utilizator AlexandruValeanuAlexandru Valeanu AlexandruValeanu Data 16 august 2013 19:21:27
Problema Fructe Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.31 kb
#include <iostream>
#include <fstream>

using namespace std;

int main()
{
    ifstream f("fructe.in");
    ofstream g("fructe.out");

    int T, P, B;

    for ( f >> T; T; T-- )
    {
        f >> P >> B;

        g << ( B & 1 ) << "\n";
    }

    f.close();
    g.close();

    return 0;
}