-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBC1848.cpp
More file actions
40 lines (38 loc) · 842 Bytes
/
BC1848.cpp
File metadata and controls
40 lines (38 loc) · 842 Bytes
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
/*
This scenario is so interesting; those who watched Game of Thrones can relate to it.
*/
#include <bits/stdc++.h>
using namespace std;
int main()
{
int sum = 0;
string crow;
while (getline(cin, crow))
{
if (crow == "caw caw")
{
cout << sum << endl;
sum = 0;
}
else
{
if (crow == "---")
sum += 0;
if (crow == "--*")
sum += 1;
if (crow == "-*-")
sum += 2;
if (crow == "-**")
sum += 3;
if (crow == "*--")
sum += 4;
if (crow == "*-*")
sum += 5;
if (crow == "**-")
sum += 6;
if (crow == "***")
sum += 7;
}
}
return 0;
}