Programming/코딩 문제 풀이
2020/04/21 코딩 문제 연습(7단계 / 백준 5622번) C++
갓비니
2020. 4. 21. 18:29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <iostream>
#include <string>
using namespace std;
int main() {
string word;
int time = 0;
cin >> word;
if (word[i] < 'D')time += 3;
else if (word[i] < 'G')time += 4;
else if (word[i] < 'J')time += 5;
else if (word[i] < 'M')time += 6;
else if (word[i] < 'P')time += 7;
else if (word[i] < 'T')time += 8;
else if (word[i] < 'W')time += 9;
else if (word[i] <= 'Z')time += 10;
}
cout << time;
}
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
|
아니,,, 쒸익쒸익,,,
단어로 안하고 그냥 숫자 68, 71, 이런식으로 넣었다가 틀렸당..