Cod sursa(job #1503509)

Utilizator cosceexcosceex cosceex Data 16 octombrie 2015 13:23:52
Problema Grupuri Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.24 kb
#include <fstream>

using namespace std;

ifstream f("f.in");
ofstream g("f.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;
}