Advertisement
Guest User

Untitled

a guest
May 24th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.37 KB | None | 0 0
  1. using System;
  2.  
  3. namespace test
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int n = int.Parse(Console.ReadLine());
  10.             bool isTrue = false;
  11.  
  12.             int trueCount = 0;
  13.             int falseCount = 0;
  14.  
  15.             for (int i = 0; i < n; i++)
  16.             {
  17.                 int a = int.Parse(Console.ReadLine());
  18.                 int b = int.Parse(Console.ReadLine());
  19.                 int c = int.Parse(Console.ReadLine());
  20.  
  21.                 if (b != 0 && a / b == c)
  22.                 {
  23.                     isTrue = true;
  24.                 }
  25.                 else
  26.                 {
  27.                     isTrue = false;
  28.                 }
  29.  
  30.                 if (isTrue)
  31.                 {
  32.                     trueCount += 84;
  33.                     falseCount = falseCount / (84 / 10);
  34.                 }
  35.                 else
  36.                 {
  37.                     trueCount = trueCount / (70 / 10);
  38.                     falseCount += 70;
  39.                 }
  40.             }
  41.             bool isResult = false;
  42.             if (falseCount != 0 && (trueCount / falseCount) % 2 == 0)
  43.             {
  44.                 isResult = true;
  45.             }
  46.  
  47.             Console.WriteLine($"T: {trueCount}");
  48.             Console.WriteLine($"F: {falseCount}");
  49.             Console.WriteLine($"Got a Roin coin: {isResult}");
  50.         }
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement