Skip to content

Instantly share code, notes, and snippets.

@PedroRacchetti
Created April 28, 2020 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PedroRacchetti/2e6557a0f84923b9fb7dee4ba1106541 to your computer and use it in GitHub Desktop.
Save PedroRacchetti/2e6557a0f84923b9fb7dee4ba1106541 to your computer and use it in GitHub Desktop.
#include<bits/stdc++.h>
using namespace std;
int v, p;
int main(){
scanf("%d", &v);
scanf("%d", &p);
for(int i = 1; i <= p; i++){
if(i <= v%p) printf("%d\n",v/p + 1 );
else printf("%d\n", v/p );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment