QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#755474#9552. The Chariotucup-team191#Compile Error//C++23623b2024-11-16 17:26:362024-11-16 17:26:38

Judging History

你现在查看的是最新测评结果

  • [2024-11-16 17:26:38]
  • 评测
  • [2024-11-16 17:26:36]
  • 提交

answer

BLS=1000
def sti(x):
	if len(x)<BLS:
		if x=='':
			return 0
		return int(x)
	return sti(x[:-BLS])*(10**BLS)+int(x[-BLS:])
def its(x):
	if x<10**BLS:
		return str(x)
	os=str(x%(10**BLS))
	os='0'*(BLS-len(os))+os
	return its(x//(10**BLS))+os
t=int(input())
for _ in range(t):
	a,b,c,x,y,d=map(sti,input().split())
	an=a*((d+x-1)//x)
	an=min(an,(a+b*y)*(d//(x+y))+a+b*max(0,d%(x+y)-x))
	if d>=x:
		an=min(an,a*(d//x)+b*(d%x)+(c-b)*max(0,d%x-y*(d//x)))
		an=min(an,a*(d//x)+b*(d%x)+(c-b)*max(0,d%x-y))
	if d>=x+y:
		an=min(an,a+b*y+c*(d-x-y))
		an=min(an,(a+b*y)*(d//(x+y))+c*(d%(x+y)))
	print(its(an))

Details

answer.code:4:23: error: empty character constant
    4 |                 if x=='':
      |                       ^~
answer.code:1:1: error: ‘BLS’ does not name a type
    1 | BLS=1000
      | ^~~