C++)
#include <iostream>
#include <string>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n, temp;
cin >> n;
int op[2] = { 0,0 };
for (int i = 0; i < n; i++) {
cin >> temp;
op[temp] ++;
}
if (op[1] > op[0])
cout << "Junhee is cute!";
else
cout << "Junhee is not cute!";
return 0;
}
Python)
import sys
read = sys.stdin.readline
n = int(read().rstrip())
op = [0, 0]
for _ in range(n):
op[int(read().rstrip())] += 1
if op[1] > op[0]:
print("Junhee is cute!")
else:
print("Junhee is not cute!")'백준 1 > 기초' 카테고리의 다른 글
| [백준 11655] ROT 13 (C++/Python) (0) | 2020.12.05 |
|---|---|
| [백준 2743] 단어 길이 재기 (C++/Python) (0) | 2020.12.05 |
| [백준 10992] 별 찍기 - 17 (C++) (0) | 2020.12.05 |
| [백준 10991] 별 찍기 - 16 (C++) (0) | 2020.12.05 |
| [백준 1157] 단어 공부 (C++/Python) (0) | 2020.12.05 |