import java.util.Random;
import java.util.Scanner;
public class A4 {
public static void main(String[] args) {
Random shu = new Random();
int num = 0;
int o = shu.nextInt(100) + 1;
Scanner sc = new Scanner(System.in);
boolean TF = false;
while (!TF) {
System.out.println("请输入要猜的数");
int oo = sc.nextInt();
if (oo > o) {
num++;
System.out.println("大了");
}
else if (oo < o) {
num++;
System.out.println("小了");
}
else {num++;
System.out.println("猜对了"+"用了"+num+"次");
TF = true;
}
}
sc.close();
}
}