Created
July 8, 2017 06:29
-
-
Save dwikipedia/9b285e3adb3b1d0883ce200767075502 to your computer and use it in GitHub Desktop.
Comparing and giving score from a0,b0,a1,b1, and a2, b2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
class Solution { | |
static void Main(String[] args) { | |
string[] tokens_a0 = Console.ReadLine().Split(' '); | |
int a0 = Convert.ToInt32(tokens_a0[0]); | |
int a1 = Convert.ToInt32(tokens_a0[1]); | |
int a2 = Convert.ToInt32(tokens_a0[2]); | |
string[] tokens_b0 = Console.ReadLine().Split(' '); | |
int b0 = Convert.ToInt32(tokens_b0[0]); | |
int b1 = Convert.ToInt32(tokens_b0[1]); | |
int b2 = Convert.ToInt32(tokens_b0[2]); | |
int aScore = 0; | |
int bScore = 0; | |
if(a0> b0){ | |
aScore++; | |
} | |
if(a1>b1){ | |
aScore++; | |
} | |
if(a2>b2){ | |
aScore++; | |
} | |
if(a0<b0){ | |
bScore++; | |
} | |
if(a1<b1){ | |
bScore++; | |
} | |
if(a2<b2){ | |
bScore++; | |
} | |
Console.WriteLine(aScore + " " + bScore); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment