import java.util.Scanner; public class Paska { public static void main(String[] args) { int bar; int max = 3; // Kuinka monta yritystä lasketaan Scanner foo = new Scanner(System.in); while (true){ bar = foo.nextInt(); // Seuraava hashattava luku? count = 0; // Aloitetaan etsimällä eka mahdollinen sijoituspaikka while (count < max) { System.out.println(count+". yritys: "+ ((bar + 2 + count*count) % 23)); ++count; } } } }