fork(2) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. int uczniowie[] = new int[500];
  13. int cukierki[] = new int[500];
  14.  
  15. Scanner skan = new Scanner (System.in);
  16.  
  17. int t = skan.nextInt();
  18.  
  19. for(int i=0; i<t; i++){
  20. uczniowie[i] = skan.nextInt();
  21. cukierki[i] = skan.nextInt();
  22. }
  23.  
  24.  
  25. for(int i=0; i<t; i++){
  26.  
  27. if(cukierki[i]==0)
  28. System.out.println("NIE");
  29.  
  30. else{
  31. uczniowie[i] = uczniowie[i]-1;
  32.  
  33.  
  34. if(uczniowie[i]<cukierki[i])
  35. System.out.println("TAK");
  36.  
  37. else{
  38.  
  39. if(uczniowie[i]%cukierki[i]==0)
  40. System.out.println("Nie");
  41. else
  42. System.out.println("TAK");
  43. }
  44.  
  45. }
  46. }
  47. }
  48. }
Runtime error #stdin #stdout #stderr 0.06s 4386816KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Exception in thread "main" java.util.NoSuchElementException
	at java.util.Scanner.throwFor(Scanner.java:862)
	at java.util.Scanner.next(Scanner.java:1485)
	at java.util.Scanner.nextInt(Scanner.java:2117)
	at java.util.Scanner.nextInt(Scanner.java:2076)
	at Ideone.main(Main.java:17)