Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Numerics;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace arrays
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. int n = int.Parse(Console.ReadLine());
  15. bool isTrue = false;
  16. bool isFalse = false;
  17.  
  18. int trueCount = 0;
  19. int falseCount = 0;
  20.  
  21.  
  22. for (int i = 0; i < n; i++)
  23. {
  24. int a = int.Parse(Console.ReadLine());
  25. int b = int.Parse(Console.ReadLine());
  26. int c = int.Parse(Console.ReadLine());
  27.  
  28. if(b != 0 && a/b == c)
  29. {
  30. isTrue = true;
  31. }
  32. else
  33. {
  34. isFalse = true;
  35. }
  36.  
  37. if (isTrue)
  38. {
  39. trueCount += 84;
  40. falseCount = falseCount / (84 / 10);
  41. }
  42. else if (isFalse)
  43. {
  44. trueCount = trueCount / (70 / 10);
  45. falseCount += 70;
  46. }
  47.  
  48. }
  49. bool isResult = false;
  50. if (falseCount != 0)
  51.  
  52. {
  53. double evenNumber = Math.Abs((double)trueCount / falseCount);
  54.  
  55. if(evenNumber % 2 == 0)
  56. {
  57. isResult = true;
  58. }
  59.  
  60. }
  61. if(falseCount == 0 && trueCount == 0)
  62. {
  63. isResult = true;
  64. }
  65.  
  66. Console.WriteLine($"T: {trueCount}");
  67. Console.WriteLine($"F: {falseCount}");
  68. Console.WriteLine($"Got a Roin coin: {isResult}");
  69. }
  70. }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement