#include<bits/stdc++.h>
using namespace std;
int cnt(int n)
{
if(n == 0)return 0;
int res = (n/3)*2;
if(n%3 == 2)res += 1;
return res;
}
int main()
{
int t;
cin >> t;
for(int cs = 1; cs <= t; cs++){
int a,b;
cin >> a >> b;
cout << "Case "<<cs << ": "<< cnt(b) - cnt(a - 1) <<endl;
}
return 0;
}
No comments:
Post a Comment