본문 바로가기
algorithm/hackerRank

hackerrank case when 문제 풀이

by 무대포 개발자 2020. 9. 27.
728x90
반응형

문제

풀이

select
    case
        when (A + B <= C) OR (B+C <= A) OR (C+A <= B) then 'Not A Triangle'
        when A=B and B=C then 'Equilateral'
        when (A=B and B!=C) OR (B=C and C!=A) OR (C=A and A!=B) then 'Isosceles'
        when A!=B and B!=C and C != A then 'Scalene'
    end
from
    TRIANGLES
;

'algorithm > hackerRank' 카테고리의 다른 글

Hackerrank The Grid Search 풀이  (0) 2020.10.07
hackerrank Top Earners 풀이  (0) 2020.09.23
hackerrank Non-Divisible Subset 풀이  (0) 2020.09.21
hackerrank the-time-in-words 풀이  (0) 2020.09.18
Hackerrank Bigger is greater  (0) 2020.09.14

댓글