Skip to content

Commit 07f5b9d

Browse files
committed
Adding configuration for "Vote counting".
1 parent c2b49c5 commit 07f5b9d

File tree

12 files changed

+103
-0
lines changed

12 files changed

+103
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
fscanf($stdin, "%d", $N);
2+
fscanf($stdin, "%d", $M);
3+
for ($i = 0; $i < $N; $i++)
4+
{
5+
fscanf($stdin, "%s %d", $personName, $nbVote);
6+
}
7+
for ($i = 0; $i < $M; $i++)
8+
{
9+
fscanf($stdin, "%s %s", $voterName, $voteValue);
10+
}
11+
12+
// Write an answer using echo(). DON'T FORGET THE TRAILING \n
13+
14+
echo("output\n");
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"namespace": "Community\\Training\\Medium\\VoteCounting",
3+
"name": "Vote counting",
4+
"group": "voteCounting",
5+
"link": "https://www.codingame.com/ide/puzzle/vote-counting",
6+
"tests": [
7+
{
8+
"name": "Example",
9+
"group": "example",
10+
"method": "Example",
11+
"file": "01 - example.txt"
12+
},
13+
{
14+
"name": "Invalid voter",
15+
"group": "invalidVoter",
16+
"method": "InvalidVoter",
17+
"file": "02 - invalid voter.txt"
18+
},
19+
{
20+
"name": "Too many votes",
21+
"group": "tooManyVotes",
22+
"method": "TooManyVotes",
23+
"file": "03 - too many votes.txt"
24+
},
25+
{
26+
"name": "Maybe vote",
27+
"group": "maybeVote",
28+
"method": "MaybeVote",
29+
"file": "04 - maybe vote.txt"
30+
},
31+
{
32+
"name": "Complex",
33+
"group": "complex",
34+
"method": "Complex",
35+
"file": "05 - complex.txt"
36+
}
37+
]
38+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2
2+
3
3+
Albert 2
4+
Roger 1
5+
Albert Yes
6+
Roger No
7+
Albert Yes
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
1
2+
4
3+
Albert 3
4+
CodinGame Yes
5+
Albert Yes
6+
Albert No
7+
Albert No
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
3
2+
6
3+
Yohann 1
4+
Sandra 3
5+
Capucine 1
6+
Capucine Yes
7+
Sandra No
8+
Yohann Yes
9+
Sandra No
10+
Yohann Yes
11+
Sandra No
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2
2+
2
3+
Kevin 1
4+
Charlotte 1
5+
Kevin Maybe
6+
Charlotte Yes
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
4
2+
9
3+
Albert 2
4+
Roger 1
5+
Thierry 1
6+
Valérie 3
7+
Albert Yes
8+
Valérie Yes
9+
Erwan No
10+
Albert No
11+
Thierry Yes
12+
Valérie Yes
13+
Valérie No
14+
Valérie Non
15+
Roger Maybe
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1 2
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1 3

0 commit comments

Comments
 (0)