3 条题解

  • 0
    @ 2025-3-23 12:12:57
    #include <bits/stdc++.h> 
    using namespace std;
    
    int main(){ 
    	int n;
    	cin>>n;
    	if ((27+23+n/3)<(n/1.2))cout<<"Bike";
    	else if((27+23+n/3)>(n/1.2))cout<<"Walk";
    	else if((27+23+n/3)==(n/1.2))cout<<"All";
    
    return 0;}
    
    • 0
      @ 2025-2-18 21:13:07

      #include<bits/stdc++.h>** ** using namespace std; int main(){** ** int n;** ** cin>>n;** ** double b = 27 + 23 + n / 3; ** double w = n / 1.2;** ** if(b < w){** ** cout << "Bike";** ** }else if(w < b){ ** cout << "Walk"; ** }else{ ** cout << "All"; ** } ** return 0; }

      • 0
        @ 2025-1-16 16:22:06

        #include<bits/stdc++.h>

        using namespace std;

        int main(){

        int s;
        
        double bike,walk;
        
        cin>>s;
        
        bike=s/3.0+50;
        
        walk=s/1.2;
        
        if(bike==walk) cout<<"All";
        
        else if(bike>walk) cout<<"walk";
        
        else cout<<"Bike";
        

        }

        • 1

        信息

        ID
        41
        时间
        1000ms
        内存
        128MiB
        难度
        2
        标签
        (无)
        递交数
        97
        已通过
        60
        上传者