시험 통과 여부 확인하기
https://www.codetree.ai/missions/4/problems/verify-test-passed?&utm_source=clipboard&utm_medium=text
n = int(input())
if n >= 80:
print("pass")
else:
new_n = 80-n
print(new_n, "more score")
숫자의 조건 여부
https://www.codetree.ai/missions/4/problems/number's-condition?&utm_source=clipboard&utm_medium=text
a = int(input())
if a >= 113:
print(1)
else:
print(0)
비교에 따른 연산
c = input()
new_c = c.split(" ")
a = int(new_c[0])
b = int(new_c[1])
if a > b:
print(a*b)
else:
print(b//a)
'코딩테스트 > 프로그래밍 기초 | 조건문' 카테고리의 다른 글
[코드트리] if if 조건문 (0) | 2024.09.10 |
---|---|
[코드트리] if elif elif else 조건문 (0) | 2024.09.10 |
[코드트리] if elif else 조건문 (1) | 2024.09.02 |
[코드트리] 삼항 연산자 (0) | 2024.08.31 |
[코드트리] if 조건문 (0) | 2024.08.26 |