1
0

Day 5-8 submissions

This commit is contained in:
2021-12-08 22:14:58 -05:00
parent 5689b82731
commit 533aae2f1c
8 changed files with 552 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
#include <iostream>
#include <algorithm>
#include <math.h>
#include <string>
using namespace std;
struct Note
{
string patterns[10];
string outputs[4];
friend istream &operator>>( istream &input, Note &n ) {
for(int i = 0; i < 10; i++)
{
input >> n.patterns[i];
}
for(int i = 0; i < 4; i++)
{
input >> n.outputs[i];
}
return input;
}
};
int main()
{
Note note;
int count = 0;
while (cin >> note)
{
for(int i = 0; i < 4; i++)
{
switch(note.outputs[i].size())
{
case 2:
case 3:
case 4:
case 7:
count++;
break;
default:
break;
}
}
}
cout << count << endl;
return 0;
}