【题目】http://codeforces.com/contest/1016/problem/A
【题意】已知一共多少天,书上一页多少格,每天要填多少格子,问每天需要翻多少页。
【代码】
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ll n,m;
scanf("%I64d%I64d",&n,&m);
ll w=0;
for(int i=0;i<n;i++)
{
ll t;
scanf("%I64d",&t);
t+=w;
ll s=t/m;
printf("%I64d ",s);
w=t-s*m;
}
}