Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading;
  6.  
  7. namespace Тупняк.День2
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. long a1, a2, a3, b1, b2 , b3;
  14. string[] tokens = Console.ReadLine().Split();
  15. string[] tr2 = Console.ReadLine().Split();
  16. a1 = Convert.ToInt64(tokens[0]);
  17. a2 = Convert.ToInt64(tokens[1]);
  18. a3 = Convert.ToInt64(tokens[2]);
  19. b1 = Convert.ToInt64(tr2[0]);
  20. b2 = Convert.ToInt64(tr2[1]);
  21. b3 = Convert.ToInt64(tr2[2]);//zadala blya
  22.  
  23. if (Math.Pow(a1, 2) + Math.Pow(a2, 2) == Math.Pow(a3, 2) && Math.Pow(b1, 2) + Math.Pow(b2, 2) == Math.Pow(b3, 2) ||
  24. Math.Pow(a1, 2) + Math.Pow(a2, 2) == Math.Pow(a3, 2) && Math.Pow(b2, 2) + Math.Pow(b1, 2) == Math.Pow(b3, 2) ||
  25. Math.Pow(a1, 2) + Math.Pow(a2, 2) == Math.Pow(a3, 2) && Math.Pow(b3, 2) + Math.Pow(b2, 2) == Math.Pow(b1, 2) ||
  26.  
  27. Math.Pow(a1, 2) + Math.Pow(a3, 2) == Math.Pow(a2, 2) && Math.Pow(b1, 2) + Math.Pow(b3, 2) == Math.Pow(b2, 2) ||
  28. Math.Pow(a1, 2) + Math.Pow(a3, 2) == Math.Pow(a2, 2) && Math.Pow(b2, 2) + Math.Pow(b1, 2) == Math.Pow(b3, 2) ||
  29. Math.Pow(a1, 2) + Math.Pow(a3, 2) == Math.Pow(a2, 2) && Math.Pow(b3, 2) + Math.Pow(b2, 2) == Math.Pow(b1, 2) ||
  30.  
  31. Math.Pow(a2, 2) + Math.Pow(a3, 2) == Math.Pow(a1, 2) && Math.Pow(b1, 2) + Math.Pow(b3, 2) == Math.Pow(b2, 2) ||
  32. Math.Pow(a2, 2) + Math.Pow(a3, 2) == Math.Pow(a1, 2) && Math.Pow(b2, 2) + Math.Pow(b1, 2) == Math.Pow(b3, 2) ||
  33. Math.Pow(a2, 2) + Math.Pow(a3, 2) == Math.Pow(a1, 2) && Math.Pow(b3, 2) + Math.Pow(b2, 2) == Math.Pow(b1, 2)
  34. )
  35. {
  36. Console.Write(1);
  37. }
  38. else
  39. Console.Write(0);
  40.  
  41. }
  42.  
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement