Advertisement
NabilaShova

11723-Numbering roads

Apr 26th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int r,n,a,i=1;
  5.     while(scanf("%d %d", &r, &n)==2 && r!=0 && n!=0)
  6.     {
  7.         printf("Case %d: ",i);
  8.         i++;
  9.         a=(r-1)/n;
  10.         if(a>26)
  11.             printf("impossible\n");
  12.         else
  13.             printf("%d\n", a);
  14.     }
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement