/ 科创班 /

记录详情

Accepted


  
# 状态 耗时 内存占用
#1 Accepted 2ms 256.0 KiB
#2 Accepted 1ms 256.0 KiB
#3 Accepted 2ms 256.0 KiB
#4 Accepted 1ms 256.0 KiB
#5 Accepted 1ms 256.0 KiB
#6 Accepted 1ms 256.0 KiB
#7 Accepted 2ms 256.0 KiB
#8 Accepted 1ms 256.0 KiB
#9 Accepted 1ms 256.0 KiB
#10 Accepted 1ms 256.0 KiB

代码


#include <stdio.h>
int main()
{
	long int i;
	int bonus1,bonus2,bonus4,bonus6,bonus10,bonus; 
	scanf("%ld",&i);

 
		bonus1 = 100000 * 0.1;
		bonus2 = bonus1 + 100000 * 0.075;
		bonus4 = bonus2 + 200000 * 0.05;
		bonus6 = bonus4 + 200000 * 0.03;
		bonus10 = bonus6 + 400000 * 0.015;
		if(i <= 100000)
		{
			bonus = i * 0.1;
		} 
		else if(i <= 200000)
		{
			bonus = bonus1 + (i - 100000) * 0.075;
		}
		else if(i <= 400000)
		{
			bonus = bonus2 + (i - 200000) * 0.05;
		}
		else if(i <= 600000)
		{
			bonus = bonus4 + (i - 400000) * 0.03;
		}
		else if(i <= 1000000)
		{
			bonus = bonus6 + (i - 600000) * 0.015;
		}
		else if(i > 1000000)
		{
			bonus = bonus10 + (i - 1000000) * 0.01;
		}
		printf("%d",bonus);

	return 0;
}

信息

递交者
类型
递交
题目
4.10发奖金
题目数据
下载
语言
C
递交时间
2018-07-18 22:53:59
评测时间
2018-07-18 22:53:59
评测机
分数
100
总耗时
18ms
峰值内存
256.0 KiB