TIL24. algorithm 기초

Jaeyeon·2021년 2월 25일
0
post-thumbnail

세수정렬

a = list(map(int,input().split()))
a.sort()
for i in a:
    print(i, end =' ')

8진수 2진수

print(bin(int(input(), 8))[2:])

구글 검색

주사위 세개

a, b, c = map(int, input().split())
if a == b == c:
    print(10000 + a*1000)
elif a == b:
    print(1000 + a*100)
elif b == c:
    print(1000 + b*100)
elif c == a:
    print(1000 + c*100)
else:
    print(max(a, b, c)*100)

구글 검색

과자

a, b, c = map(int,input().split())
if a*b <= c:
    print(0)
else:
    print(a*b - c)

사파리월드

a,b = map(int,input().split())
if a>b:
    print(a-b)
elif b>a:
    print(b-a)
else:
    print(0)

인공지능 시계

a, b, c = map(int,input().split())
t = int(input())
print((a+(b+(c+t)//60)//60)%24,(b+(c+t)//60)%60,(c+t)%60)

구글 참조

profile
생각하는 개발자 되기

0개의 댓글