나를 기록하다
article thumbnail
반응형

1) 내가 작성한 코드

x, y, z = map(int, input().split())

if x==y and y==z:
    print(10000+1000*x)
elif x==y and y!=z:
    print(1000+100*x)
elif y==z and z!=x:
    print(1000+100*y)
elif z==x and x!=y:
    print(1000+100*z)
else:
    print(max(x,y,z)*100)

2) 클린 코드

a, b, c = map(int, input().split())

if a == b == c:
    print(10000+a*1000)
elif a == b:
    print(1000+a*100)
elif a == c:
    print(1000+a*100)
elif b == c:
    print(1000+b*100)
else:
    print(100 * max(a,b,c))
반응형
profile

나를 기록하다

@prao

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!

profile on loading

Loading...