Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <algorithm>
- #include <math.h>
- #include <string>
- #include <cstdlib>
- #include <cstring>
- #include <stack>
- #include <queue>
- #include <vector>
- #define IN freopen("f:\\in.txt", "rt", stdin);
- #define OUT freopen("f:\\out.txt", "wt", stdout);
- #define FOR(n) for(int i = 0; i < n; i++)
- #define LL long long int
- #define STESTCASE int t;scanf("%d", &t);getchar();for(int tc = 1; tc <= t; tc++)
- #define TESTCASE int t;scanf("%d", &t);for(int tc = 1; tc <= t; tc++)
- #define PF printf
- #define SF scanf
- #define EP 0.000000001
- #define MAX 1000
- using namespace std;
- int main()
- {
- //IN OUT
- long long m , n;
- TESTCASE
- {
- int even = 0, odd = 0;
- cin >> m >> n;
- for(long long i = m; i <= n; i++)
- {
- if((i-1) % 3 == 0) even++;
- else odd++;
- }
- PF("Case %d:\nOdd = %d\nEven = %d\n\n", tc, odd, even);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement