fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. import java.math.BigInteger;
  7.  
  8. /* Name of the class has to be "Main" only if the class is public. */
  9. class Ideone
  10. {
  11. private static BigInteger hundred = BigInteger.valueOf(100);
  12. public static void main (String[] args) throws java.lang.Exception
  13. {
  14. System.out.println("Дай мне трехзначное число");
  15. Scanner in = new Scanner(System.in);
  16. BigInteger num = in.nextBigInteger();
  17. while (num.compareTo(hundred) < 0){
  18. System.out.println("Чё-то мало. Нужно минимум трехзначное");
  19. num = in.nextBigInteger();
  20. }
  21. System.out.println(num);
  22. }
  23. }
Success #stdin #stdout 0.07s 2184192KB
stdin
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999457684356
stdout
Дай мне трехзначное число
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999457684356