/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Accepted 14ms 3.07 MiB
#2 Runtime Error Traceback (most recent call last): File "foo.py", line 6, in <module> ValueError: invalid literal for int() with base 10: '\r' 13ms 3.09 MiB
#3 Accepted 19ms 2.93 MiB
#4 Accepted 19ms 3.285 MiB
#5 Accepted 19ms 2.977 MiB
#6 Accepted 19ms 3.102 MiB

Code

s = input() #y=0x-1
for _ in range(int(input())):
    x,y = map(int, input().split())
    n = s.index("x")
    m = int(s[2:n])
    c = int(s[n+1::])
    if y == (m*x+c):
        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:42:20
Judged At
2024-10-03 14:05:04
Judged By
Score
80
Total Time
19ms
Peak Memory
3.285 MiB