2 条题解

  • 1
    @ 2023-10-2 14:11:02
    #include<iostream>
    #include<cstdio>
    #include<cmath>
    #include<algorithm>
    using namespace std;
    int main(){
    	int a;
    	double b,w;
    	cin >> a;
    	b = 1.0*a/3.0+27+23;
    	w = 1.0*a/1.2;
    	bool bl = b>w;
    	switch (bl){
    		case 1:
    			cout << "Walk";
    			break;
    		case 0:
    			if (b == w){
    				cout << "All";
    			}else if (b<w){
    				cout << "Bike";
    			}
    			break;
    	}
    	return 0;
    }
    
    • 0
      @ 2023-10-22 11:25:41
      #include  <bits/stdc++.h>
      using namespace std;
      int main()
      {
          double m;
          cin>>m;
          double bike=m/3.0+50.0;
          double walk=m/1.2;
          if(bike>walk) cout<<"Walk";
          else if(walk>bike) cout<<"Bike";
          else cout<<"All";
          return 0;
      }
      
      • 1

      信息

      ID
      6858
      时间
      1000ms
      内存
      128MiB
      难度
      1
      标签
      (无)
      递交数
      57
      已通过
      28
      上传者