[파이썬][백준 17388번] 와글와글 숭고한
1. 문제Permalink
[Bronze IV] 와글와글 숭고한 - 17388Permalink
성능 요약Permalink
메모리: 30840 KB, 시간: 68 ms
분류Permalink
구현(implementation)
출처: 백준, https://https://www.acmicpc.net/
2. 해결방법 시간복잡도Permalink
- 단순 코딩 O(1)
3. 문제 해결 및 코드Permalink
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
S, K, H = map(int, input().split()) | |
if S + K + H >= 100: | |
print("OK") | |
elif S + K + H < 100 and S < K and S < H: | |
print("Soongsil") | |
elif S + K + H < 100 and K < S and K < H: | |
print("Korea") | |
elif S + K + H < 100 and H < S and H < K: | |
print("Hanyang") |
-
주석을 참고하면서 이해를 돕습니다.Permalink
4. 알고리즘 및 해설Permalink
- 해당 문제의 조건에 따라 값을 출력해준다.
- 3개값의 합이 100 이상이라면 OK, 100 미만이라면 가장 낮은 대학을 출력한다.