Cod sursa(job #954731)

Utilizator robertstrecheStreche Robert robertstreche Data 29 mai 2013 22:32:16
Problema Grupuri Scor 2
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.28 kb
#include <fstream>
#include <algorithm>
using namespace std;

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

long long n,s,i,k,x;

int main()
{
    f>>n>>k;
    for (i=1;i<=n;i++)
    {
      f>>x;
      s+=x;
    }
    g<<s/k+1;
    f.close();
    g.close();
}