3 条题解

  • 0
    @ 2024-10-13 21:15:42
    #include <iostream>
    using namespace std;
    
    int main() {
        int weight;
        cin >> weight;
        int cost;
        if (weight < 10) {
            cost = weight * 3;
        } else {
            cost = 10 * 2 + (weight - 10) * 1;
        }
        cout << cost << endl;
        return 0;
    }
    
    • 0
      @ 2024-8-8 21:12:42

      #include using namespace std; int main(){ int a; cin>>a; if(a<10){ cout<<a*3; }else if(a>=10){ cout<<20+(a-10)*1; }

      return 0;

      }

      • 0
        @ 2024-2-23 12:31:17

        AC的能不能发一下题解鸭

        • 1

        信息

        ID
        45
        时间
        1000ms
        内存
        256MiB
        难度
        2
        标签
        递交数
        83
        已通过
        49
        上传者