Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int r,n,ncase=0;
- while(scanf("%d%d",&r,&n) && r+n)
- {
- if(r>n*27) printf("Case %d: impossible\n",++ncase);
- else if(r%n) printf("Case %d: %d\n",++ncase,r/n);
- else printf("Case %d: %d\n",++ncase,r/n-1);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment