Skip to content

Commit

Permalink
Add contents of 0817
Browse files Browse the repository at this point in the history
  • Loading branch information
witheunjin committed Aug 17, 2020
1 parent abe9fce commit 93b353d
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 1 deletion.
18 changes: 18 additions & 0 deletions BaekJoon/10808_알파벳개수.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <iostream>
#include <vector>
using namespace std;

int main() {
string input;
cin>>input;
vector<int> a;
a = vector<int>(26,0);
for(int i=0; i<input.length(); ++i) {
int val = input[i]-97;
a[val]++;
}
for(int i=0; i<a.size(); ++i) {
cout<<a[i]<<' ';
}
return 0;
}
17 changes: 17 additions & 0 deletions BaekJoon/10987_모음의개수.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <iostream>
using namespace std;

int main() {
string input;
cin>>input;
int cnt = 0;
for(int i=0; i<input.length(); ++i) {
if(input[i] == 'a') cnt++;
else if(input[i] == 'e') cnt++;
else if(input[i] == 'i') cnt++;
else if(input[i] == 'o') cnt++;
else if(input[i] == 'u') cnt++;
}
cout<<cnt;
return 0;
}
9 changes: 9 additions & 0 deletions BaekJoon/2743_단어길이재기.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <iostream>
using namespace std;

int main() {
string input;
cin>>input;
cout<<input.length();
return 0;
}
12 changes: 12 additions & 0 deletions BaekJoon/2902_KMP는왜KMP일까.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <iostream>
using namespace std;

int main() {
string input;
cin>>input;
string output;
for(int i=0; i<input.length(); ++i) {
if(65<=(int)input[i] && (int)input[i]<=90) cout<<input[i];
}
return 0;
}
22 changes: 22 additions & 0 deletions BaekJoon/2941_크로아티아알파벳.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <iostream>
using namespace std;

int main() {
string input;
cin>>input;
int cnt=0;
for(int i=0; i<input.length(); ++i) {
cout<<"now : "<<input[i]<<endl;
if(input[i] == 'c' && input[i+1] == '=') {i++; cnt++;}
else if(input[i] == 'c' && input[i+1]=='-') {i++; cnt++;}
else if(input[i]=='d' && input[i+1]=='z' && input[i+2]=='=') {i+=2; cnt++;}
else if(input[i]=='d' && input[i+1]=='-'){ i++; cnt++;}
else if(input[i]=='l' && input[i+1]=='j') { i++; cnt++;}
else if(input[i]=='n'&& input[i+1]=='j'){ i++; cnt++;}
else if(input[i]=='s' && input[i+1]=='='){ i++; cnt++;}
else if(input[i]=='z' && input[i+1]=='='){ i++; cnt++;}
else cnt++;
}
cout<<cnt;
return 0;
}
7 changes: 6 additions & 1 deletion BaekJoon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ https://www.acmicpc.net/
|**2908**|**상수**|2020.08.16|2|
|**5622**|**다이얼**|2020.08.16|4|
|**1316**|**그룹 단어 체커**|2020.08.16|2|
|****|****|||
|**2941**|**크로아티아 알파벳**|2020.08.17|1|
|**2743**|**단어 길이 재기**|2020.08.17|1|
|**10808**|**알파벳 개수**|2020.08.17|1|
|**2902**|**KMP는 왜 KMP일까?**|2020.08.17|1|
|**10987**|**모음의 개수**|2020.08.17|1|
|**1475**|**@방번호@**|2020.08.17|미해결|
|****|****|||
|****|****|||
|****|****|||
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@
|BaekJoon|**2908**|**상수**|2020.08.16|2|
|BaekJoon|**5622**|**다이얼**|2020.08.16|2|
|BaekJoon|**1316**|**그룹단어체커**|2020.08.16|3|
|BaekJoon|**2941**|**크로아티아 알파벳**|2020.08.17|1|
|BaekJoon|**2743**|**단어 길이 재기**|2020.08.17|1|
|BaekJoon|**10808**|**알파벳 개수**|2020.08.17|1|
|BaekJoon|**2902**|**KMP는 왜 KMP일까?**|2020.08.17|1|
|BaekJoon|**10987**|**모음의 개수**|2020.08.17|1|
|BaekJoon|**1475**|**@방번호@**|2020.08.17|미해결|

0 comments on commit 93b353d

Please sign in to comment.