package jishu;
import java.util.Random;
import java.util.Scanner;
public class Suanshu {
static Scanner scan=new Scanner(System.in);
static int num;
static String[] str=new String[4];
public static void main(String[]args) {
int a[]=new int[1000000];
int b[]=new int[1000000];
int c[]=new int[1000000];
System.out.print("请输入一共输入多少个");
int x;
num=scan.nextInt();
System.out.println("一行个数");
x=scan.nextInt();
str[0]="+";
str[1]="-";
str[2]="*";
str[3]="/";
Random rand=new Random();
int num0=0;
int num1;
int num2,num3;
for(int i=0;i<num;i++) {
int z=0;
do {
num1=rand.nextInt(99)+1;
num2=rand.nextInt(4);
if(num2==1) num3=rand.nextInt(num1);
if(num2==2) {
num3=rand.nextInt(100/num1);
}
else num3=rand.nextInt(98)+1;
if(num0>=1) {
for(int j=0;j<num0;j++) {
if((num1==a[j])&&(num2==b[j])&&(num3==c[j])) {
z=0;
}
else {
a[j]=num1;
b[j]=num2;
c[j]=num3;
z=1;
num0++;
}
if(num0==0) {
a[0]=num1;
b[0]=num2;
c[0]=num3;
num0++;
z=1;
}
}
}
}while(z==1);
System.out.print(i+1);
System.out.print("、");
System.out.print(num1);
System.out.print(str[num2]);
System.out.print(num3);
System.out.print("=");
if((i+1)%x==0)
System.out.println(" ");
else
System.out.print(" ");
}
}
}