QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#728329#9552. The Chariotucup-team3161#Compile Error//C++171.1kb2024-11-09 14:59:032024-11-09 14:59:04

Judging History

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

  • [2024-11-09 14:59:04]
  • 评测
  • [2024-11-09 14:59:03]
  • 提交

answer

T = int(input())
for _ in range (T):
    a,b,c,x,y,d = input().split()
    a=int(a)
    b=int(b)
    c=int(c)
    x=int(x)
    y=int(y)
    d=int(d)

    #one car
    now=d
    res1=a
    now-=min(now,x)
    res1+=b*min(now,y)
    now-=min(now,y)
    res1+=c*now

    #aaabc?
    t1=d//x
    res2=t1*a

    #aaaa
    now=d%x
    res22=res2
    res22+=a
    now-=min(now,x)

    #aaabc..
    now=d%x
    res2+=b*min(now,y)
    now-=min(now,y)
    res2+=c*now

    #ababab
    t2=d//(x+y)
    res3=t2*(a+y*b)

    #ababab ab?
    now=d%(x+y)
    res33=res3
    res33+=a
    now-=min(now,x)
    res33+=min(now,y)*b
    now-=min(now,y)

    #ababab c
    now=d%(x+y)

    res32=res3
    res32+=now*c

    #print(res1)
    #print(res2)
    #print(res22)
    #print(res33)
    #print(res32)
    
    res=min(res1,res22,res33)
    if t1>0:
        res=min(res,res2)
    if t2>0:
        res=min(res,res32)
    
    #ababab a
    now=d%(x+y)
    if now<=x:
        preb=t2*y
        res31=res3+a
        res31-=min(preb,x-now)*b
        res=min(res,res31)

    
    print(res)

詳細信息

answer.code:11:6: error: invalid preprocessing directive #one
   11 |     #one car
      |      ^~~
answer.code:19:6: error: invalid preprocessing directive #aaabc
   19 |     #aaabc?
      |      ^~~~~
answer.code:23:6: error: invalid preprocessing directive #aaaa
   23 |     #aaaa
      |      ^~~~
answer.code:29:6: error: invalid preprocessing directive #aaabc
   29 |     #aaabc..
      |      ^~~~~
answer.code:35:6: error: invalid preprocessing directive #ababab
   35 |     #ababab
      |      ^~~~~~
answer.code:39:6: error: invalid preprocessing directive #ababab
   39 |     #ababab ab?
      |      ^~~~~~
answer.code:47:6: error: invalid preprocessing directive #ababab
   47 |     #ababab c
      |      ^~~~~~
answer.code:53:6: error: invalid preprocessing directive #print
   53 |     #print(res1)
      |      ^~~~~
answer.code:54:6: error: invalid preprocessing directive #print
   54 |     #print(res2)
      |      ^~~~~
answer.code:55:6: error: invalid preprocessing directive #print
   55 |     #print(res22)
      |      ^~~~~
answer.code:56:6: error: invalid preprocessing directive #print
   56 |     #print(res33)
      |      ^~~~~
answer.code:57:6: error: invalid preprocessing directive #print
   57 |     #print(res32)
      |      ^~~~~
answer.code:65:6: error: invalid preprocessing directive #ababab
   65 |     #ababab a
      |      ^~~~~~
answer.code:1:1: error: ‘T’ does not name a type
    1 | T = int(input())
      | ^