電費

 avatar
user_3763047219
c_cpp
2 years ago
335 B
0
Indexable
Never
int main()
{
	int kg = 0, km = 0;
	scanf("%d %d", &kg, &km);
	if (kg < 5&& km<10) {
		printf("%d",100);
	}
	else if (kg < 5) {
		printf("%d", 10 * km + 100);
	}
	else if (kg < 10) {
		printf("%d", 20 * km+100);
	}
	else if (kg < 20) {
		printf("%d", 40 * km+100);
	}
	else if (kg >= 20) {
		printf("不收件");
	}
}