Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
32957 | www.luogu.com | 【入门】货物 | C++ | 解答错误 | 0 MS | 248 KB | 234 | 2023-12-23 16:19:02 |
#include <bits/stdc++.h> using namespace std; int main(){ float n,a; cin>>n; if(n>500){ a=(n-500)*0.8; n=500*0.5; cout<<fixed<<setprecision(1)<<a+n; } else{ n=n*0.5; cout<<fixed<<setprecision(1)<<n; } }