-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbeecrowd1848.cpp
More file actions
45 lines (44 loc) · 1.1 KB
/
beecrowd1848.cpp
File metadata and controls
45 lines (44 loc) · 1.1 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
/**
* @file beecrowd1848.cpp
* see the problem - https://prnt.sc/civbCQAs4Mg_
* @author Md. Alamin (alamin5g@yahoo.com)
* I would love be a software engineer at Google. That is why anybody can uses this code without any condition, if you face any difficulty, then try to email me.
* @version 0.1
* @date 2022-07-07
*
* @copyright Copyright (c) 2022
*
*/
#include <bits/stdc++.h>
using namespace std;
int main(){
int c=1, sum=0;
string s;
while(c<=3) {
getline(cin, s);
if(s[0]=='c'){
cout << sum << endl;
c++;
sum = 0;
}else{
if(s == "---"){
sum += 0;
}else if(s == "--*"){
sum += 1;
}else if(s == "-*-"){
sum += 2;
}else if(s == "-**"){
sum += 3;
}else if(s == "*--"){
sum += 4;
}else if(s == "*-*"){
sum += 5;
}else if(s == "**-"){
sum += 6;
}else if(s == "***"){
sum += 7;
}
}
}
return 0;
}