90分求指正
查看原帖
90分求指正
1409000
DawnStar21楼主2024/8/26 15:43
#include<stdio.h>
int main()
{
	int x, n, s;
	scanf("%d%d", &x, &n);
	
	if(n <= 7 - x + 1)
	{
		if(7 - x + 1 <= 2)
		{
			s = 0;
		}else
		{
			s = n * 250 - 500;
		}
		
	}else
	{
		s = ((n - (7 - x + 1)) / 7) * 1250 + ((n - (7 - x + 1)) % 7) * 250 + ((7 - x + 1) * 250 - 500);
	}
	printf("%d", s);
	 
	return 0;
}
2024/8/26 15:43
加载中...