-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path15904.cpp
More file actions
46 lines (40 loc) · 748 Bytes
/
15904.cpp
File metadata and controls
46 lines (40 loc) · 748 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
41
42
43
44
45
46
/**
* @file 15904.cpp
* @brief UCPC는 무엇의 약자일까?
* @author Sam Kim (samkim2626@gmail.com)
*/
#include <iostream>
#include <string>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
string s;
getline(cin, s);
int cnt = 0;
for (int i = 0; i < s.size(); i++)
{
if (s[i] == 'U' && cnt == 0)
{
cnt++;
}
else if (s[i] == 'C' && (cnt == 1 || cnt == 3))
{
cnt++;
}
else if (s[i] == 'P' && cnt == 2)
{
cnt++;
}
}
if (cnt == 4)
{
cout << "I love UCPC" << '\n';
}
else
{
cout << "I hate UCPC" << '\n';
}
return 0;
}