|
|
back to boardWhat should I do. Can you give me some test. I've got WA on case 10. plz help me. #include<stdio.h> int main(){ ....int n,k,i,dis; ....scanf("%d%d",&dis,&n); ....for(i = 0;i < n;i++){ ........scanf("%d",&k); ........if(dis != k) dis -= k; ........if(dis < 0){printf("YES"); return 0;} ........if(dis % k != 0) dis += k - dis%k; ....} ....printf("NO"); ....return 0; } Edited by author 02.05.2006 23:21 Re: What should I do. Can you give me some test. Change (dis != k) to (dis % k != 0) and you'll get AC. Good luck ;) Re: What should I do. Can you give me some test. Thank you very much!! Now I got AC. |
|
|