Last active
January 5, 2016 00:01
-
-
Save achvaicer/ebe71aee2de7c29b9b01 to your computer and use it in GitHub Desktop.
Mega da virada
This file contains 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; | |
using System.Text; | |
public static class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var vencedor = new [] { 02, 18, 31, 42, 51, 56 }; | |
var jogos = File.ReadAllLines("mega.txt").Select(x => x.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries).Select(y => int.Parse(y)).ToList()).ToList(); | |
Console.WriteLine("Jogo vencedor: {0}", string.Join(", ", vencedor)); | |
foreach(var jogo in jogos) | |
{ | |
var count = 0; | |
foreach(var j in jogo) | |
{ | |
if (vencedor.Contains(j)) | |
{ | |
Console.ForegroundColor = ConsoleColor.Green; | |
count++; | |
} | |
else | |
{ | |
Console.ForegroundColor = ConsoleColor.White; | |
} | |
Console.Write(" {0,2} ", j); | |
} | |
Console.ForegroundColor = ConsoleColor.Yellow; | |
Console.Write(" => {0} acertos \n", count); | |
} | |
Console.Read(); | |
} | |
} |
This file contains 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
20 23 33 37 55 57 | |
3 13 20 32 39 43 | |
5 6 12 26 59 60 | |
14 29 30 33 41 44 | |
28 44 46 51 55 59 | |
4 25 34 43 54 60 | |
16 30 34 53 57 59 | |
8 11 16 25 42 52 | |
16 31 34 37 41 50 | |
26 31 35 37 40 46 | |
5 15 42 45 48 56 | |
9 12 28 48 56 57 | |
6 7 27 38 48 59 | |
8 20 29 39 45 46 | |
5 14 22 36 46 60 | |
13 16 20 27 35 46 | |
8 13 29 31 34 59 | |
8 40 45 50 53 57 | |
1 25 34 37 48 56 | |
3 4 12 22 28 42 | |
30 34 46 53 54 56 | |
5 14 15 23 42 53 | |
4 11 17 22 43 58 | |
2 16 35 47 48 59 | |
8 16 26 27 33 43 | |
4 14 38 44 51 52 | |
14 16 18 44 48 52 | |
1 12 20 37 46 52 | |
1 10 47 48 49 54 | |
3 23 38 40 44 59 | |
14 22 29 30 41 43 | |
10 14 19 21 23 27 | |
2 17 43 44 46 55 | |
9 10 26 34 35 39 | |
4 5 6 9 31 34 | |
4 14 26 32 38 55 | |
17 18 24 42 44 60 | |
3 9 13 15 20 44 | |
1 18 27 35 45 52 | |
2 21 37 39 45 56 | |
2 32 36 40 41 51 | |
14 28 37 38 40 60 | |
12 30 32 34 43 47 | |
11 26 33 35 46 56 | |
5 17 38 45 52 60 | |
10 12 14 30 40 55 | |
1 3 6 7 11 22 | |
6 15 18 37 40 46 | |
5 19 24 26 30 54 | |
34 39 41 48 55 56 | |
5 6 21 27 44 57 | |
5 15 31 43 45 57 | |
12 33 42 45 48 55 | |
1 6 30 38 45 49 |
This file contains 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
{ | |
"version": "1.0.0-*", | |
"dependencies": {}, | |
"frameworks": { | |
"dnx451": {}, | |
"dnxcore50": { | |
"dependencies": { | |
"System.Console": "4.0.0-beta-*" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment