fork(1) download
  1. using System;
  2.  
  3. namespace Test
  4. {
  5. class Program
  6. {
  7. public static void Main(string[] args)
  8. {
  9. //ZADANIE - Pierwiastek
  10.  
  11. uint ile = uint.Parse(Console.ReadLine());
  12. for (int i = 0; i < ile; i++)
  13. {
  14. double liczba = double.Parse(Console.ReadLine());
  15. double pierwiastek = Math.Sqrt(liczba);
  16. if (liczba > 0 && (pierwiastek == (int)pierwiastek))
  17. {
  18. Console.WriteLine("TAK");
  19. }
  20. else
  21. {
  22. Console.WriteLine("NIE");
  23. }
  24. }
  25. }
  26. }
  27. }
Success #stdin #stdout 0.02s 16124KB
stdin
4
1
-2
3
4
stdout
TAK
NIE
NIE
TAK