AcWing 805. x和y的最大值

简介: AcWing 805. x和y的最大值

文章目录

  • AcWing 805. x和y的最大值
  • AC代码


AcWing 805. x和y的最大值

本题链接:AcWing 805. x和y的最大值

本博客给出本题截图

image.png

AC代码

代码

#include <iostream>
#include <algorithm>
using namespace std;
int max(int x, int y)
{
    if (x > y) return x;
    return y;
}
int main()
{
    int x, y;
    cin >> x >> y;
    cout << max(x, y) << endl;
    return 0;
}


目录
相关文章
|
5月前
|
C++ Python 容器
leetcode-515:在每个树行中找最大值
leetcode-515:在每个树行中找最大值
26 0
|
3天前
acwing 789 数的范围
acwing 789 数的范围
12 4
|
12月前
【Leetcode -605.种花问题 -628.三个数的最大乘积】
【Leetcode -605.种花问题 -628.三个数的最大乘积】
25 0
|
C++
acwing 716. 最大数和它的位置 int的最大值和最小值
acwing 716. 最大数和它的位置 int的最大值和最小值
87 0
LeetCode 1877. 数组中最大数对和的最小值
一个数对 (a,b) 的 数对和 等于 a + b 。最大数对和 是一个数对数组中最大的 数对和 。
110 0
leetcode515 在每个树行中找最大值
leetcode515 在每个树行中找最大值
50 0
AcWing 614. 最大值
AcWing 614. 最大值
69 0
AcWing 614. 最大值
AcWing 53. 最小的k个数
AcWing 53. 最小的k个数
76 0
AcWing 53. 最小的k个数
AcWing 806. 两个数的和
AcWing 806. 两个数的和
72 0
AcWing 806. 两个数的和