Advertisement
atiqxp

1069_oj

Oct 26th, 2013
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include<stdio.h>
  2. int main(void)
  3. {
  4.     int t,i,m,l;
  5.     scanf("%d",&t);
  6.     for(i=1; i<=t; i++)
  7.     {
  8.         scanf("%d%d",&m,&l);
  9.         if(m<=l)
  10.         {
  11.            printf("Case %d: %d\n",i,(l*4)+19);
  12.         }
  13.         else
  14.         {
  15.             printf("Case %d: %d",i,((m-l)+m)+19);
  16.         }
  17.         }
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement