16 solutions

  • 4
    @ 2024-7-9 16:43:46
    #include <bits/stdc++.h>
    using namespace std;
    int main(int argc, char **argv){
    	int a,b,c,mx = -1;
    	cin >> a >> b >> c;
    	mx = max(a,b);
    	mx = max(mx,c);
    	cout << mx;
    	return 0;
    }
    
    
    • 3
      @ 2023-10-4 15:11:35
      #include<cstdio>
      using namespace std;
      int main()
      {
          int a,b,c;
          scanf("%d%d%d",&a,&b,&c);
          if ((a>=b)&&(a>=c)) printf("%d",a) ;
            else if ((b>=a)&&(b>=c)) printf("%d",b) ;
            else printf("%d",c);
          return 0;
      }
      
      • 2
        @ 2024-1-27 11:43:50
        #include <iostream>
        #include <algorithm>
        #include <iomanip>
        using namespace std;
        
        int a[4];
        
        int main()
        {
        	cin >> a[1] >> a[2] >> a[3];
        	sort(a+1, a+3 + 1);
        	cout << a[3];
        	//cout << fixed << setprecision(3) << y << endl;
        	return 0;
        }
        
        • 2
          @ 2024-1-27 11:43:09
          #include <iostream>
          #include <algorithm>
          #include <iomanip>
          using namespace std;
          
          int a[4];
          
          int main()
          {
          	cin >> a[1] >> a[2] >> a[3];
          	sort(a+1, a+3 + 1);
          	cout << a[3];
          	//cout << fixed << setprecision(3) << y << endl;
          	return 0;
          }
          
          • 1
            @ 2024-7-9 20:15:24
            #include <iostream>
            #include <algorithm>
            #include <iomanip>
            using namespace std;
            int a[4];
            int main()
            {
            	cin >> a[1] >> a[2] >> a[3];
            	sort(a+1, a+3 + 1);
            	cout << a[3];
            	//cout << fixed << setprecision(3) << y << endl;
            	return 0;
            }
            
            • 1
              @ 2024-7-9 19:43:40

              #include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; a=max(a,b); a=max(a,c); cout<<a; return 0; }

              • 0
                @ 2024-7-9 17:06:37

                #include #include using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int max=a; if(b>max)max=b; if(c>max)max=c; cout<<max<<"\n"; return 0; }

                • 0
                  @ 2024-1-30 15:42:39
                  #include<bits/stdc++.h>
                  using namespace std;
                  
                  int main () {
                  	int x,y,z; cin >> x >> y >> z;
                  	cout << ((x>y?x:y)>z?(x>y?x:y):z);
                  	return 0;
                  }
                  
                  • 0
                    @ 2024-1-27 9:16:41
                    #include<iostream>
                    #include<iomanip>
                    using namespace std;
                    int main(){
                    	int a,b,c,mx=0;
                    	cin>>a>>b>>c;
                    	mx=max(a,max(b,c));
                    	cout<<mx<<endl;
                    }
                    

                    max函数快很多

                    • 0
                      @ 2023-10-4 10:21:21
                      #include <iostream>
                      using namespace std;
                      int main(){
                          int yuanshen,keli,wendi;
                      
                          cin>>yuanshen;
                          cin>>keli;
                          cin>>wendi;
                          if(yuanshen>keli&&yuanshen>wendi) cout<<yuanshen;
                          else if (keli>yuanshen&&keli>wendi) cout<<keli;
                          else cout<<wendi;
                      }
                      
                      
                      • 0
                        @ 2023-9-19 19:07:30
                        #include <bits/stdc++.h>
                        using namespace std;
                        int main(int argc, char **argv){
                        	int a,b,c,mx = -1;
                        	cin >> a >> b >> c;
                        	mx = max(a,b);
                        	mx = max(mx,c);
                        	cout << mx;
                        	return 0;
                        }
                        
                        • 0
                          @ 2023-7-15 17:56:03

                          练习c++两年半,志在让老师白吃干饭。 题库里题解不断,看名就知道是我在干。

                          #include<iostream>
                          using namespace std;
                          int main()
                          {
                          int a,b,c;
                          cin>>a>>b>>c;
                          int max = a;
                          if(b > max) max = b;
                          if(c > max) max = c;
                          cout<<max<<"\n";
                          
                          • @ 2024-1-27 9:18:52

                            建议变量名不要用c++库里有的函数名,容易报错

                        • -1
                          @ 2023-10-4 14:36:05

                          #include #include using namespace std; int main() { int a,b,c; cin >>a>>b>>c; if (a>b&&a>c) { cout <<a<<endl; } if (a>b&&a<c) { cout <<c<<endl; } if (a<b&&b>c) { cout <<b<<endl; } if (a<b&&b<c) { cout <<c<<endl; }

                          return 0;
                          

                          }

                          • -1
                            @ 2023-9-16 15:48:17

                            #include<bits/stdc++.h> using namespace std; int main(){ int a=0,b=0,c=0,d=0,e=0; scanf("%d %d %d",&a,&b,&c); d=a>b?a:b; e=d>c?d:c; printf("%d",e); return 0; }

                            • -1
                              @ 2023-7-19 22:06:04
                              #include<iostream>
                              #include<iomanip>
                              #include<cmath>
                              #include<string>
                              using namespace std;
                              int main(){
                              	int woshizhixinren;
                              	int zhixinhighschool;
                              	int zhixinshiwojia;
                              	cin>>woshizhixinren;
                              	cin>>zhixinhighschool;
                              	cin>>zhixinshiwojia;
                              	if(woshizhixinren>zhixinhighschool)
                              		if(woshizhixinren>zhixinshiwojia)
                              			cout<<woshizhixinren;
                              		else
                              			cout<<zhixinshiwojia;
                              	else
                              		if(zhixinhighschool>zhixinshiwojia)
                              			cout<<zhixinhighschool;
                              		else
                              			cout<<zhixinshiwojia;
                              }
                              

                              变量名都是执信的名字! 唱跳rap, 来自初一新生的热血!

                              • @ 2023-7-19 22:07:31

                                上面一堆头文件是我复制懒得删的哈! 只需要iostream就可以了

                              • @ 2023-9-19 19:08:13

                                太花了

                            • -3
                              @ 2024-7-9 19:28:28
                              #include<bits/stdc++.h>
                              using namespace std;
                              int main() {
                              	int a,b,c;
                              	cin>>a>>b>>c;
                              	if(a>b&&a>c)
                              	cout<<a;
                              	else if(b>a&&b>c)
                              	cout<<b;
                              	else if(c>a&&c>b)
                              	cout<<c;
                              	else
                              	
                              	return 0;
                              }
                              
                              • 1

                              Information

                              ID
                              540
                              Time
                              1000ms
                              Memory
                              256MiB
                              Difficulty
                              2
                              Tags
                              # Submissions
                              165
                              Accepted
                              96
                              Uploaded By