Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
426 B
1
Indexable
Never
//Bai 6
#include <iostream>

using namespace std;
typedef long long ll;

void solve(int y, int k, int n){
	int nk = n/k*k;
	if(y >= nk){
		cout << -1 << endl;
		return ;
	}
	for(int i = k; i <= nk; i+=k)
		if(i > y)
			cout << i-y << " ";
	cout << endl;
}

int main(){
	freopen("test.inp","r",stdin);
	freopen("test.out","w",stdout);

	int y, k, n; cin >> y >> k >> n;
	solve(y,k,n);
	
	return 0;
}
Leave a Comment