为什么14点一直过不去,输出的第二行一直输出一个“.”?
查看原帖
为什么14点一直过不去,输出的第二行一直输出一个“.”?
358749
tzph_ckl楼主2020/8/31 18:41
#include<bits/stdc++.h>
using namespace std;
int main(){
    double a,b[2],c[2],d[2],B,C,D,e[2];
    cin>>a;
    cin>>b[0];
    cin>>b[1];
    cin>>c[0];
    cin>>c[1];
    cin>>d[0];
    cin>>d[1];
    B=ceil(a/b[0])*b[1];
    C=ceil(a/c[0])*c[1];
    D=ceil(a/d[0])*d[1];
    e[0]=B;
    e[1]=C;
    e[2]=D;
    sort(e,e+3);
    cout<<e[0];
    return 0;
}
2020/8/31 18:41
加载中...