Cod sursa(job #289666)

Utilizator APMeMangra Alex APMe Data 26 martie 2009 21:32:28
Problema Fructe Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.24 kb
#include<fstream.h>
main ()
{long p,b;
 int t;
 ifstream i("fructe.in");
 ofstream o("fructe.out");
 i>>t;
 while(t--)
  {i>>p>>b;
   if(b%2==0)
     o<<0<<'\n';
    else
     o<<1<<'\n';
   }
 i.close();
 o.close();
 return 0;
}