Go: package main

import (
	"fmt"
	"strconv"
)

func main() {
	for _, leftValue := range MultiplicationTableNum(9) {
		for _, rightValue := range MultiplicationTableNum(9) {
			strLeftVal, strRightVal, strMulti := strconv.Itoa(leftValue), strconv.Itoa(rightValue), strconv.Itoa(Multiplication(leftValue, rightValue))
			fmt.Println(strLeftVal + "x" + strRightVal + "=" + strMulti)
		}
	}
}

func MultiplicationTableNum(num int) []int {
	multiNum := []int{}
	for i := 1; i <= num; i++ {
		multiNum = append(multiNum, i)
	}
	return multiNum
}

func Multiplication(x, y int) int {
	return x * y
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair
#define loop(i,a,b) for(ull i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)
#define iter(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i)
#define riter(i,c) for(auto i=(c).rbegin(); i!=(c).rend(); ++i)
const double eps = 1e-10;
const double pi = acos(-1.0);
const double inf = (int)1e8;

int main(){
  rep(i,9)rep(j,9){
    cout << i+1 << "x" << j+1 << "=" << (i+1)*(j+1) << endl;
  }
}

C++: #include <cstdio>

using namespace std;

int main ()
{
	for (int i=1;i<=9;i++)
	{
		for (int t=1;t<=i;t++)
		{
			printf ("%dx%d=%d\n",i,t,i*t);
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <bitset>
#include <ctime>
#include <algorithm>
using namespace std;

#define FOR(i,a,b) for (int i = a; i < b; ++i)

#define sz 2601

vector< bitset<sz> > p;
int a[55][55];

int abs(int x) {
	return x >= 0 ? x : -x;
}

int gcd(int a, int b) {
	return b ? gcd(b, a % b) : a;
}

bool in(int x, int y, int n, int m) {
	return x >= 0 && x < n && y >= 0 && y < m;
}

int init(int n, int m) {
	p.clear(); bitset<sz> cur;
	FOR(i, 0, n) FOR(j, 0, m) FOR(ii, i + 1, n) FOR(jj, 0, m) {
		if (jj == j) continue;
		int g = gcd(ii - i, abs(jj - j));
		if (g != 1 || in(i - g, j - g, n, m)) continue;
		bool ok = true;
		cur.reset();
		int x = i, y = j, dx = ii - i, dy = jj - j;
		while (in(x, y, n, m)) {
			if (a[x][y] == 0) {
				ok = false;
				break;
			}
			cur[x * n + y] = 1;
			x += dx, y += dy;
		}
		if (ok && cur.count() >= 3) p.push_back(cur);
	}
	FOR(i, 0, n) {
		cur.reset();
		bool ok = true;
		FOR(j, 0, m) {
			if (a[i][j] == 0) { ok = false; break; }
			cur[i * n + j] = 1;
		}
		if (ok && cur.count() >= 3) p.push_back(cur);
	}
	FOR(j, 0, m) {
		cur.reset();
		bool ok = true;
		FOR(i, 0, n) {
			if (a[i][j] == 0) { ok = false; break; }
			cur[i * n + j] = 1;
		}
		if (ok && cur.count() >= 3) p.push_back(cur);
	}
	return p.size();
}

int solve(int n, int m, int tot) {
	int ans = 0;
	random_shuffle(p.begin(), p.end());
	while (true) {
		bitset<sz> cur;
		cur.reset();
		FOR(i, 0, n) FOR(j, 0, m) if (a[i][j]) cur[i * n + j] = 1;
		if (cur.count() == 0) break;
		int id = -1, num = -1;
		FOR(i, 0, tot) {
			int now = (cur & p[i]).count();
			if (now != p[i].count() || now <= num) continue;
			num = now, id = i;
		}
		//cout << id << " " << num << endl;
		if (id == -1) return -1;
		FOR(i, 0, n) FOR(j, 0, m) if (p[id][i * n + j]) --a[i][j];
		++ans;
	}
	return ans;
}

int main()
{
	int t, n, m;
	scanf( "%d", &t );
	while (t--) {
		scanf( "%d%d", &n, &m );
		++n, ++m;
		FOR(i, 0, n) FOR(j, 0, m) scanf( "%d", &a[i][j] );
		int tot = init(n, m);
		//cout << tot << endl;
		int ans = -1;
		while (ans == -1) ans = solve(n, m, tot);
		printf( "%d\n", ans );
	}
	return 0;
}

C++: null

C++: #include<iostream>
using namespace std;

int main(){
for(int i=1;i<=9;i++){
for(int i=j;j<=9;j++){
if(i>=j){
cout << i << "x" << j << "=" << i*j << endl;
}
else
{
break;
}
}
}
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  loop(i,1,10)loop(j,1,10)cout<<i<<"x"<<j<<"="<<i*j<<endl;
}

C++: #include <stdio.h>

int main(void){
  int i,j;

  for(i=1;i<=9;i++){
    for(j=1;j<=9;j++){
      printf("%dx%d=%d\n", i, j, i*j);
    }
  }

  return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	for(int i=1;i<=9;i++){
		for(int j=1;j<10;j++){
			cout<<i<<'x'<<j<<'='<<i*j<<endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	for(int i = 1;i < 10;i++){
		for(int j = 1;j < 10;j++){
			cout<<i<<"x"<<j<<"="<<i * j<<endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;

int a;
int b;
int c;

int main(){
	a=0;
	while (a<9) {
		a++;
		c=a;
		b=0;
		while (b<9) {
			b++;
		    cout << a << "x" << b << "=" << c << endl;
			c += a;
		}
	}
    return 0;
}

C++: #include<iostream>
using namespace std;

int main()
{
	for(int i=1;i<=9;i++)
		cout<<i<<"*"<<i<<"="<<i*i<<endl;

	return 0;
}

C++: #include<stdio.h>

int main(){
  int i,j,k;
  for(i=1;i<=9;i++){
    for(j=1;j<=9;j++){

      k=i*j;
  printf("%dx%d=%d\n",i,j,k);
    }
  }

 

    return 0;
}

C++: #include<stdio.h>

int main(){

	int i, j;

	for(i=1; i<=9; i++)
	{
		for(j=1; j<=9; j++){
			printf("%dx%d=%d", i, j, i*j);
		}
	}

    return 0;
}

C++: #include<iostream>
#include<stdio.h>
int main(){
	int a,b;
		for(a=1;a<10;a++){
			for(b=1;b<10;b++){
				std::cout<<a<<"x"<<b<<"="<<a*b<<std::endl;
				}
			}


   system("pause");
      return 0;
	}

C++: #include <iostream>
#include <queue>
#include <vector>
#include <set>
#include <algorithm>
#include <stdio.h>
#define int long long
inline int in() { int32_t x; scanf("%d", &x); return x ;}
using namespace std;
const int INF = 1e18;
const int MAX_N = 1e5 + 5;
int32_t main()
{
    for (int i = 1 ; i <= 9 ; i ++)
    {
        for (int x = 1 ; x <= 9 ; x ++)
        {
            printf("%d*%d=%d",i,x,i*x);
            cout << endl;
        }
    }
    cout << endl;
}

C++: #include <stdio.h>

main()
{	int i,j;

	for(i=1;i<=9;i++)
		for(j=1;j<=9;j++)
			printf("%dx%d=%d\n",i,j,i*j);

	return(0);

}

C++: #include <iostream>
int main(){
	int a,b,c;
		for(a=1;a<10;++a){
			for(b=1;b<10;++b){
				c=a*b;
				std::cout<<a<<"テδ?<<b<<"="<<c<<std::endl;
				}
		}
	
	 return 0;
	}

C++: #include <iostream>

using namespace std;

int main(){
	int a,b,c;
	for(b=1;b<=9;b++){
		for(a=1;a<=9;a++){
			c=a*b;
			cout<<b<<"x"<<a<<"="<<c<<endl;
		}
	}
}

C++: #include<iostream>
using namespace std;
main()
{ 
  for(int i=1;i<10;i++){
    for(int j=1;j<10;j++){
      cout<<i<<"x"<<j<<"="<<i*j<<endl;
    }
  }
  return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<sstream>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<string>
#include<numeric>
#include<set>
using namespace std;

int main(){

  for(int i = 1; i <= 9; i++){
    for(int j = 1; j <= 9; j++)
      cout << i << "x" << j << "=" << i*j << endl;
  }
  
  return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
  for(int i=1; i<=9; i++){
    for(int j=1; j<=9; j++){
      cout<<i<<"x"<<j<<"="<<i*j<<endl;
    }
  }
}

C++: include <iostream>
  
int main(){
    for(int i = 1; i < 10; ++i){
        for(int j = 1; j < 10; ++j){
            std::cout << i << "x" << j << "=" << i*j << std::endl;
        }
    }
    return 0;
}