1 solutions

  • 0
    @ 2025-10-20 15:34:48
    #include<iostream>
    using namespace std;
    int main(){
        //假设每天每头牛吃一份草量
        int a = 1;
        //15头牛吃20天的总草量,也就是20天的长草量加上原草量
        int n15 = 15*20*a;
        //20头牛10天吃的总草量,也就是10天的长草量加上原草量
        int n20 = 20*10*a;
        //每天的长草量
        int m = (n15-n20)/(20-10);
        //每天的长草量够几头牛吃
        int nx = m/a;
        cout<<nx;
        return 0;
    }
    
    • 1

    Information

    ID
    171
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    1
    Tags
    # Submissions
    127
    Accepted
    99
    Uploaded By