3 条题解

  • 0
    @ 2026-3-17 20:02:58
    #include <bits/stdc++.h>
    using namespace std;
    int main() {
    	int a;
    	cin >> a;
    	if (a <= 10) {
    		cout << fixed << setprecision(2) << a * 0.8+0.2;
    	} else if (a > 10 && a <= 20) {
    		cout << fixed << setprecision(2) << (a-10) * 0.75 +10*0.8+0.2;
    	} else if (a > 20 && a <= 30) {
    		cout << fixed << setprecision(2) << (a-20)*0.7+10*0.75+10*0.8+0.2;
    	} else {
    		cout << "Fail";
    	}
    	return 0;
    }
    

    信息

    ID
    144
    时间
    1000ms
    内存
    64MiB
    难度
    7
    标签
    递交数
    305
    已通过
    63
    上传者