1 条题解

  • 0
    @ 2026-2-3 10:42:49

    C++ :

    #include <iostream>  
    using namespace std;  
    
    int main() {  
        int distance;  
        cin >> distance;  
    
        // 骑车的总时间  
        double bike_time = 27 + (distance / 3.0) + 23;  
        
        // 步行的总时间  
        double walk_time = distance / 1.2;  
    
        // 比较时间  
        if (bike_time < walk_time) {  
            cout << "Bike" << endl;  
        } else if (bike_time > walk_time) {  
            cout << "Walk" << endl;  
        } else {  
            cout << "All" << endl;  
        }  
    
        return 0;  
    }
    
    • 1

    信息

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