A - +-x Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 100100

問題文

整数 AA, BB があります。

A+BA + B,  AB\ A - B,  A×B\ A \times B の中で最大の数を出力してください。

制約

  • 入力は全て整数である。
  • 100A, B100-100 \leq A,\ B \leq 100

入力

入力は以下の形式で標準入力から与えられる。

AA BB

出力

A+BA + B,  AB\ A - B,  A×B\ A \times B の中で最大の数を出力せよ。


入力例 1Copy

Copy
-13 3

出力例 1Copy

Copy
-10

A+B=10A + B = -10,  AB=16\ A - B = -16,  A×B=39\ A \times B = -39 の中で最大の数は 10-10 です。


入力例 2Copy

Copy
1 -33

出力例 2Copy

Copy
34

A+B=32A + B = -32,  AB=34\ A - B = 34,  A×B=33\ A \times B = -33 の中で最大の数は 3434 です。


入力例 3Copy

Copy
13 3

出力例 3Copy

Copy
39

A+B=16A + B = 16,  AB=10\ A - B = 10,  A×B=39\ A \times B = 39 の中で最大の数は 3939 です。

Score : 100100 points

Problem Statement

We have two integers: AA and BB.

Print the largest number among A+BA + B, ABA - B, and A×BA \times B.

Constraints

  • All values in input are integers.
  • 100A, B100-100 \leq A,\ B \leq 100

Input

Input is given from Standard Input in the following format:

AA BB

Output

Print the largest number among A+BA + B, ABA - B, and A×BA \times B.


Sample Input 1Copy

Copy
-13 3

Sample Output 1Copy

Copy
-10

The largest number among A+B=10A + B = -10, AB=16A - B = -16, and A×B=39A \times B = -39 is 10-10.


Sample Input 2Copy

Copy
1 -33

Sample Output 2Copy

Copy
34

The largest number among A+B=32A + B = -32, AB=34A - B = 34, and A×B=33A \times B = -33 is 3434.


Sample Input 3Copy

Copy
13 3

Sample Output 3Copy

Copy
39

The largest number among A+B=16A + B = 16, AB=10A - B = 10, and A×B=39A \times B = 39 is 3939.



2025-03-31 (Mon)
21:55:02 +00:00