文章
105
粉丝
69
获赞
117
访问
61.3k
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 1e5;
LL x, ans;
int main()
{
cin >> x;
if(x <= N) ans = x * 0.1;
else if(x <= N * 2)
ans = N * 0.1 + (x - N) * 0.075;
else if(x <= N * 4)
ans = N * 0.1 + N * 0.075 + (x - 2 * N) * 0.05;
else if(x <= N * 6)
ans = N * 0.1 + N * 0.075 + 2 * N * 0.05 + (x - 4 * N) * 0.03;
else if(x <= N * 10)
ans = N * 0.1 + N * 0.075 + 2 * N * 0.05 + 2 * N * 0.03 + (x - 6 * N) * 0.015;
else
ans = N * 0.1 + N * 0.075 + 2 * N * 0.05 + 2 * N * 0.03 + 4 * N * 0.015 + (x - 10 * N) * 0.01;
cout << ans;
return 0;
}
登录后发布评论
暂无评论,来抢沙发