3 条题解

  • 1
    @ 2025-10-6 18:30:51
    #include <iostream>
    using namespace std;
    int main()
    {
    	int a,b,c;
    	cin >> a >> b >> c;
        cout << max(max(a,b),c);
        
    	return 0;
    }
    
    • 1
      @ 2025-1-28 22:20:28

      @System Error 你不放代码是什么意思呀

      #include<bits/stdc++.h>
      using namespace std;
      const int N=1e5+5,INF=0x3f3f3f3f;
      int a,b,c;
      int main()
      {
      	cin>>a>>b>>c;
      	cout<<max(a,max(b,c));
      	return 0;
      }
      
      • -2
        @ 2021-12-4 12:19:22

        max函数:返回两个数中较大的一个数
        包括库:

        #include <cmath>
        

        语法:

        max(double x, double y);
        

        作用: 返回x, y 中的最大值
        本题思路: 输入三个数a,b,c ,对a和b取最大值后再与c取最大值,即

        max(max(a,b),c);
        

        即可。

        • @ 2025-10-6 18:28:55

          似乎不用 cmath 也能实现 max 函数 吧

      • 1

      信息

      ID
      892
      时间
      1000ms
      内存
      128MiB
      难度
      4
      标签
      递交数
      70
      已通过
      30
      上传者