1013_求最大值(分支结构)

2022-5-16 18:16| 发布者: Hocassian| 查看: 72| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-2-89503480086900-Problem List-采集的数据-后羿采集器.html

Pro.ID

1013

Title

求最大值(分支结构)

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=1013

AC

2530

Submit

7442

Ratio

34.00%

时间&空间限制

  • Time Limit: 200/100 MS (Java/Others)     Memory Limit: 32768/5000 K (Java/Others)
  • 描述

    读入三个整数a、b和c,输出最大的那个(the largest one)。

    输入

    测试数据有多个,一个占一行,每行是三个整数a、b和c,空格隔开。

    输出

    Description

    读入三个整数a、b和c,输出最大的那个(the largest one)。

    Input

    测试数据有多个,一个占一行,每行是三个整数a、b和c,空格隔开。

    Output

    为每组测试数据,输出一行:a、b、c三者中的最大值。

    For each test case, output the largest one of a, b and c  in one line.

    Sample Input

    3 9 6
    1 1 1
    -1 -2 -3
    -3 -2 -1

    Sample Output

    9
    1
    -1
    -1

    Hint

    处理多组测试用例,可用

    while ( scanf( "%d%d%d", &a, &b, &c ) != EOF )  // 未到文件结束

    while ( scanf( "%d%d%d", &a, &b, &c ) == 3 )  // 能够读入3个数

    Author

    样例输入

    3 9 6
    1 1 1
    -1 -2 -3
    -3 -2 -1

    样例输出

    9
    1
    -1
    -1

    提示

    处理多组测试用例,可用

    while ( scanf( "%d%d%d", &a, &b, &c ) != EOF )  // 未到文件结束

    while ( scanf( "%d%d%d", &a, &b, &c ) == 3 )  // 能够读入3个数

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部