Varianta 52 / Subiectul 3 / Problema 4 |
#include<iostream> #include<math.h> using namespace std; int main() { int n,k; float x; cin>>n>>k; x=(float)(n-k*(k-1)/2)/k; if(x==floor(x)) for(int i=0;i<k;i++) cout<<x+i<<" "; else cout<<"Nu exista"; system("pause"); return 0; } |