Advertisement
erfanul007

Light OJ 1069

Dec 29th, 2018
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5. int t,i,a,b,x,y,total;
  6. scanf("%d",&t);
  7. for(i=1;i<=t;i++){
  8. scanf("%d %d",&a,&b);
  9. x=abs(a-b);
  10. x=x*4;
  11. y=a*4;
  12. total=x+y+19;
  13. printf("Case %d: %d\n",i,total);
  14. }
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement