import java.util.ArrayList;
import java.util.InputMismatchException;
import java.util.Scanner;
public class Main {
public static int inputSpeed(Scanner scanner, int count) {
int speed;
while (true) {
System.out.printf("ÐведиÑе ÑкоÑоÑÑÑ Ð¼Ð°ÑÐ¸Ð½Ñ %d\n", count);
try {
speed = scanner.nextInt();
if (speed > 0 && speed <= 250) {
break;
} else {
System.out.println("ÐепÑавилÑÐ½Ð°Ñ ÑкоÑоÑÑÑ");
}
} catch (InputMismatchException e) {
System.out.println("ÐепÑавилÑÐ½Ð°Ñ ÑкоÑоÑÑÑ");
scanner.nextLine();
}
}
return speed;
}
public static void main(String[] args) {
ArrayList