90分求助。。#3wr
查看原帖
90分求助。。#3wr
795255
smyyzjd楼主2022/11/30 15:48
#include <stdio.h>

int main()
{
	long long n,t,d,s;
	int x;
  scanf("%d %lld",&x,&n);
  if(x<=6)
  {
  	if(n<=6-x)
  	t=n;
  	else if(n>6-x&&n<=8-x)
  	t=6-x;
  	else if(n>8-x)
  	{
  		d=(n-8+x)/7;
  		if((n-8+x)%7==6)
  		t=n-2*d-2-1;
  		else
  		t=n-2*d-2;
	  }
  }
 if(x==7)
 {
 	d=n/7;
	 if(n%7==6)
  		t=n-2*d-1;
  		else
 	   t=n-2*d;
 }
 s=250*t;
printf("%lld",s);
    return 0;

}

2022/11/30 15:48
加载中...