/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Wrong Answer 14ms 3.125 MiB
#2 Runtime Error Traceback (most recent call last): File "foo.py", line 20, in <module> ValueError: invalid literal for int() with base 10: '\r' 14ms 3.105 MiB

Code

q = input()
n = int(input())
query = []

for _ in range(n):
    x, y = map(int, input().split())
    query.append([x, y])

for x, y in query:
    m = q[q.index('=')+1:q.index('x')]
    c = q[q.index('x')+1:]

    if m == '':
        m = 1
    if c == '':
        c = 0

    print(m,c)

    if int(m) * x + int(c) == y:
        print("YES")
    else:
        print("NO")

Information

Submit By
Type
Submission
Problem
P1015 Friend in need is a friend indeed
Contest
Brain booster - 1
Language
Python 3 (Python 3.12.3)
Submit At
2023-12-31 15:49:39
Judged At
2024-11-11 03:45:23
Judged By
Score
0
Total Time
14ms
Peak Memory
3.125 MiB