-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGroverIrusta2634.java
More file actions
93 lines (80 loc) · 1.67 KB
/
GroverIrusta2634.java
File metadata and controls
93 lines (80 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import java.util.Scanner;
import java.util.Vector;
//Author: Grover Irusta
//University: Universidad Privada Domingo Savio - Tarija
//Date: 23-07-16
public class BirthdayStatistics2634{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int casos = in.nextInt();
int []v = new int[12];
int uno = 0,dos = 0,tres = 0,cuatro=0,cinco=0,seis=0,siete=0,ocho=0,nueve=0,diez=0,once=0,doce=0;
while (casos-->0)
{
int n = in.nextInt();
String cad= in.next();
String vector[] = cad.split("/");
if (Integer.parseInt(vector[1])==1)
{
uno++;
v[0]= uno;
}
else if (Integer.parseInt(vector[1])==2)
{
dos++;
v[1]=dos;
}
else if (Integer.parseInt(vector[1])==3)
{
tres++;
v[2]=tres;
}
else if (Integer.parseInt(vector[1])==4)
{
cuatro++;
v[3]= cuatro;
}
else if (Integer.parseInt(vector[1])==5)
{
cinco++;
v[4]= cinco;
}
else if (Integer.parseInt(vector[1])==6)
{
seis++;
v[5]= seis;
}
else if (Integer.parseInt(vector[1])==7)
{
siete++;
v[6]= siete;
}
else if (Integer.parseInt(vector[1])==8)
{
ocho++;
v[7]= ocho;
}
else if (Integer.parseInt(vector[1])==9)
{
nueve++;
v[8]= nueve;
}
else if (Integer.parseInt(vector[1])==10)
{
diez++;
v[9]= diez;
}
else if (Integer.parseInt(vector[1])==11)
{
once++;
v[10]= once;
}
else if (Integer.parseInt(vector[1])==12)
{ doce++;
v[11]= doce ;
}
}
for (int i = 0; i < v.length; i++)
System.out.println((i+1)+" "+ v[i]);
}
}