1 条题解

  • 0
    @ 2024-8-2 16:19:43

    C++ :

    #include<iostream>
    using namespace std;
    int x,y,z,s = 0;//s 代表应付金额
    int main() {
    cin>>x>>y>>z;
    if(z % y == 0){
    s = x * z / y;
    } 
    else{
    s = x * (z / y + 1);
    } 
    cout<<s;
    return 0;
    }
    
    • 1

    信息

    ID
    977
    时间
    1000ms
    内存
    128MiB
    难度
    10
    标签
    递交数
    3
    已通过
    3
    上传者