34 lines
471 B
C++
34 lines
471 B
C++
|
#include <iostream>
|
||
|
#include<cstdio>
|
||
|
#include<algorithm>
|
||
|
#include <cmath>
|
||
|
using namespace std;
|
||
|
const int N=1e5+5;
|
||
|
void init(int n)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
int main()
|
||
|
{
|
||
|
int t;
|
||
|
int t1=0;
|
||
|
int n;
|
||
|
scanf("%d",&t);
|
||
|
while(t--)
|
||
|
{
|
||
|
scanf("%d",&n);
|
||
|
init(n);
|
||
|
for(int i=1;i<=n; i++)
|
||
|
{
|
||
|
for(int j=1;j<=n;j++)
|
||
|
{
|
||
|
int z=(i&j)+(i|j);
|
||
|
printf("%d,%d:%d\n",i,j,z);
|
||
|
}
|
||
|
}
|
||
|
printf("Case %d: %d\n",++t1,n);
|
||
|
}
|
||
|
return 0;
|
||
|
}
|
||
|
|