40分懵圈
查看原帖
40分懵圈
374185
Leo_Anderson楼主2022/10/23 13:26
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int used;cin>>used;
    int basic,extra,exextra;
    double cost;
    
    if(used>=401)
    {exextra=used-400;extra=400-150;basic=150;}
    else if(used>=151)
    {extra=used-150;basic=150;}
    else if(used<=150)
    {basic=used;}
    
    cost=0.4463*basic+0.4663*extra+0.5663*exextra;

    printf("%.1lf",cost);
    
    return 0;
}

DEV-C++ 测试的第一个测试点输入267,输出了121.5,但洛谷上就是拿不到1,3,4的分

XD到底哪里有毛病啊

2022/10/23 13:26
加载中...