AtCoder Beginner Contest 129
A
Airplane
AtCoder
⌀ 0
原题
←B →
翻译中…

Problem Statement

翻译中…

There are three airports A, B and C, and flights between each pair of airports in both directions.

翻译中…

A one-way flight between airports A and B takes $P$ hours, a one-way flight between airports B and C takes $Q$ hours, and a one-way flight between airports C and A takes $R$ hours.

翻译中…

Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.

翻译中…

What is the minimum possible sum of the flight times?

翻译中…

Constraints

翻译中…
  • $1 \leq P,Q,R \leq 100$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

P Q R

翻译中…

Output

翻译中…

Print the minimum possible sum of the flight times.

翻译中…

样例

Input #1
1 3 4
Output #1
4
- The sum of the flight times in the route A $\rightarrow$ B $\rightarrow$ C: $1 + 3 = 4$ hours - The sum of the flight times in the route A $\rightarrow$ C $\rightarrow$ C: $4 + 3 = 7$ hours - The sum of the flight times in the route B $\rightarrow$ A $\rightarrow$ C: $1 + 4 = 5$ hours - The sum of the flight times in the route B $\rightarrow$ C $\rightarrow$ A: $3 + 4 = 7$ hours - The sum of the flight times in the route C $\rightarrow$ A $\rightarrow$ B: $4 + 1 = 5$ hours - The sum of the flight times in the route C $\rightarrow$ B $\rightarrow$ A: $3 + 1 = 4$ hours The minimum of these is $4$ hours.
Input #2
3 2 3
Output #2
5
题目信息
题号
abc129_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。