Cod sursa(job #1315878)
Utilizator | Data | 13 ianuarie 2015 11:24:23 | |
---|---|---|---|
Problema | Loto | Scor | 5 |
Compilator | cpp | Status | done |
Runda | Teme Pregatire ACM Unibuc 2014, Anul I | Marime | 0.39 kb |
#include <fstream>
using namespace std;
ifstream f("loto.in");
ofstream g("loto.out");
char sir[500];
unsigned long long a,nr[6];
int main()
{
for(int i=1;i<=1000;++i)
{
f>>sir>>sir;
for(int j=0;j<6;++j)
{
f>>a;
nr[j] += a;
}
}
for(int j=0;j<6;++j) g<<nr[j]/1000<<" ";
f.close();
return 0;
}