#include<stdio.h> int main() { int y,n,k,i,j,m,y1,k1; scanf("%d %d %d",&y,&k,&n); y1=(y/k+1)*k; if(y1<=n) { while(y1<=n) { while(y1-y<=0)y1+=k; printf("%d ",y1-y); y1+=k; } } else printf("-1"); return 0; }
http://codeforces.com/contest/239/problem/A
很悲剧的说 不论是多么简单的题目。。我都要错上多次才能AC。