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

27393번 - Smallest Calculated Value 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB21712111657.426%

문제

Given three integers and the arithmetic operators ($+,ドル $-,ドル $*,ドル $/$), determine the smallest non-negative integer possible without changing the order of the initial integers. Order of the operators is without their normal precedence, just left-to-right. Note: integer division is fine only if the remainder is zero. For example, 9ドル/3$ is okay, 10ドル/3$ is not.

For example:

For 2ドル,ドル 3ドル$ and 5ドル,ドル the answer is 0ドル$ (2ドル+3-5$)

For 9ドル,ドル 9ドル$ and 9ドル,ドル the answer is 0ドル$ (9ドル-9\ /\ 9$)

For 5ドル,ドル 7ドル$ and 3ドル,ドル the answer is 1ドル$ (5ドル-7+3$)

Given three integers, determine the smallest non-negative result that can be computed by placement of the given operators between the numbers. The operators may only be placed between numbers, not in front (they are not unary operators). An operator must be placed between each pair of numbers, numbers cannot be concatenated.

입력

The single line of input contains three integers, all in the range from 1ドル$ to 1ドル{,}000$.

출력

Output a single integer, which is the smallest non-negative value possible applying the arithmetic operators.

제한

예제 입력 1

2 3 5

예제 출력 1

0

예제 입력 2

9 9 9

예제 출력 2

0

예제 입력 3

5 7 3

예제 출력 3

1

힌트

출처

ICPC > Regionals > North America > North America Qualification Contest > ICPC North America Qualifier 2022 K번

  • 문제를 만든 사람: Howard Whitston
(追記) (追記ここまで)

출처

대학교 대회

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

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