Logo
(追記) (追記ここまで)

15449번 - Art 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB36128326481.231%

문제

Vera has five sticks of distinct lengths l1, l2, l3, l4, l5. Vera may choose any three of the five sticks to form the sides of a triangle. How many different triangles can Vera make? Each triangle must have positive area and sticks cannot be bent or cut.

입력

Line 1 contains integers l1, l2, l3, l4, l5 (1 ≤ li ≤ 1000).

출력

Print one line with one integer, the number of ways to form a triangle.

제한

예제 입력 1

1 2 3 4 5

예제 출력 1

3

예제 입력 2

1 2 4 8 16

예제 출력 2

0

힌트

For the first example, the 3 ways to form a triangle are choosing sticks 2, 3, 4 or 2, 4, 5 or 3, 4, 5.

출처

Contest > Waterloo's local Programming Contests > 30 September, 2017 A번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /