3 条题解

  • 0
    @ 2023-7-31 16:56:14

    #include<bits/stdc++.h> using namespace std; int a,b;定义 int main() { cin>>a>>b;输入 if(a>b) cout<<a; else cout<<b; return 0; } 非常简单,算很水的题了; 只需要简单的if else判断

    • 0
      @ 2023-4-12 21:09:35

      #include<bits/stdc++.h> using namespace std; int main() { int x; int y; cin>>x>>y; if(x>y) { cout<<x<<endl; } else { cout<<y<<endl; } }

      • 0
        @ 2022-12-9 0:58:45

        C :

        #include<stdio.h>
        int main(){
              int   a,b;
              scanf("%d %d", &a,&b);
              int  max = a;
              if(b>max) {
               max = b;
               }
              printf("%d",max);
           
        
             return 0;
        }
        

        C++ :

        #include<iostream>
        using namespace std;
        int main(){
        	int x;
        	int y;
        	cin>>x>>y;
        	if(x>y){
        		cout<<x<<endl;
        	}else{
        		cout<<y<<endl;
        	}
        }
        
        	
        
        

        Python :

        a , b = map(int,input().split());
        if a > b:
            print(a)
        else:
            print(b)
        
        • 1

        信息

        ID
        70
        时间
        1000ms
        内存
        16MiB
        难度
        1
        标签
        递交数
        115
        已通过
        86
        上传者