• Source
    1. #include<iostream>
    2. #include<cmath>
    3. #include<cstdio>
    4. using namespace std;
    5.  
    6. int main()
    7. {
    8. long tst,i,l,c;
    9. cin>>tst;
    10.  
    11. for(c=1;c<=tst;c++)
    12. {
    13. cin>>i>>l;
    14. long tym=(abs(i-l)*4)+(i*4)+19;
    15. printf("Case %ld: %ld\n",c,tym);
    16. }
    17. return 0;
    18. }
    19.