fork(2) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. for(int k=1;k<=100000;k++)
  8. {
  9. int n = Convert.ToInt32(Console.ReadLine());
  10.  
  11. for (int i = 1; i < n; i++)
  12. {
  13. if (n % i == 0&&i!=1)
  14. {
  15. Console.WriteLine("NIE");
  16. break;
  17. }
  18. else
  19. {
  20. if (i == n - 1)
  21. Console.WriteLine("TAK");
  22. }
  23. }
  24. Console.ReadKey();
  25. }
  26. }
  27. }
Success #stdin #stdout 0.05s 29664KB
stdin
11
4
1
3
stdout
TAK
NIE
TAK