/ SeriousOJ /

Record Detail

Compile Error

foo.cc:1:1: error: 'x' does not name a type
    1 | x,a,b,c,n=map(int,input().split())
      | ^

Code

x,a,b,c,n=map(int,input().split())
p=[]
for i in range(201):
    for j in range(201):
        for k in range(201):
            if x+(i*a)+(j*b)+(c*k)==n:
                p.append((i+j+k))
if(len(p)>0):
    print("YES")
    print(min(p))
else:
    print("NO")

Information

Submit By
Type
Submission
Problem
P1028 Magical box and spell
Language
C++20 (G++ 13.2.0)
Submit At
2024-04-02 08:09:24
Judged At
2024-04-06 06:10:07
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes