Cod sursa(job #1503515)

Utilizator cosceexcosceex cosceex Data 16 octombrie 2015 13:25:59
Problema Grupuri Scor 12
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.26 kb
#include <fstream>

using namespace std;

ifstream f("grupuri.in");
ofstream g("grupuri.out");

int main()
{
    int k,n,x,s=0;

    f>>k>>n;

    for(int i=1;i<=n;i++)
    {
        f>>x;
        s+=x;
    }

    g<<s/k;

    return 0;
}