Buggy python submission (verdict: Runtime Error):
X = int(input())
K = int(input())
D = int(input())
loc = 0
lis = []

def calucu_min(X,K,D):
    for num in range(K) :
        lis.append( abs(abs(2 *D *num -K *D) - abs(X)))
        lis_unique = set(lis)
    print (min(lis_unique))

calucu_min(X,K,D)

Fixed submission:
S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
    if li[num] == "R" :
        count = count + 1

if count == 0 :
    re_num = 0
elif count == 1 :
    re_num = 1
elif count == 2 and li[1] == "S" :
    re_num = 1
elif count == 2 and li[1] == "R" :
    re_num = 2
else :
    re_num = 3

print(re_num)

Buggy python submission (verdict: Runtime Error):
X = int(input())
K = int(input())
D = int(input())
loc = 0
lis = []

def calucu_min(X,K,D):
    for num in range(K) :
        lis.append( abs(abs(2 *D *num -K *D) - abs(X)))
        lis_unique = set(lis)
    print (min(lis_unique))

calucu_min(X,K,D)

Fixed submission:
S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
    if li[num] == "R" :
        count = count + 1

if count == 0 :
    re_num = 0
elif count == 1 :
    re_num = 1
elif count == 2 and li[1] == "S" :
    re_num = 1
elif count == 2 and li[1] == "R" :
    re_num = 2
else :
    re_num = 3

print(re_num)

Buggy python submission (verdict: Runtime Error):
X = int(input())
K = int(input())
D = int(input())
loc = 0
lis = []

def calucu_min(X,K,D):
    for num in range(K) :
        lis.append( abs(abs(2 *D *num -K *D) - abs(X)))
        lis_unique = set(lis)
        print (max(lis_unique))

calucu_min(X,K,D)

Fixed submission:
S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
    if li[num] == "R" :
        count = count + 1

if count == 0 :
    re_num = 0
elif count == 1 :
    re_num = 1
elif count == 2 and li[1] == "S" :
    re_num = 1
elif count == 2 and li[1] == "R" :
    re_num = 2
else :
    re_num = 3

print(re_num)

Buggy python submission (verdict: Runtime Error):
S = input()
li = list(S)
count = 0
re_num = 0
for num in range(2):
    if li[num] = "R" :
        count = count + 1

if count = 0 :
    re_num = 0
elif count = 1 :
    re_num = 1
elif count = 2 and li[2] = "S" :
    re_num = 1
elif count = 2 and li[2] = "R" :
    re_num = 2
else re_num = 3

print(re_num)

Fixed submission:
S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
    if li[num] == "R" :
        count = count + 1

if count == 0 :
    re_num = 0
elif count == 1 :
    re_num = 1
elif count == 2 and li[1] == "S" :
    re_num = 1
elif count == 2 and li[1] == "R" :
    re_num = 2
else :
    re_num = 3

print(re_num)

Buggy python submission (verdict: Runtime Error):
li = list(S)
count = 0
for num in range(1):
    if li[num] == "R" and li[num+1] == "R" :
        count = count + 1
print(count)

Fixed submission:
S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
    if li[num] == "R" :
        count = count + 1

if count == 0 :
    re_num = 0
elif count == 1 :
    re_num = 1
elif count == 2 and li[1] == "S" :
    re_num = 1
elif count == 2 and li[1] == "R" :
    re_num = 2
else :
    re_num = 3

print(re_num)

Buggy python submission (verdict: Runtime Error):

def judge(S):
    li = list(S)
    count = 0
    for num in range(1):
        if li[num] == "R" and li[num+1] == "R" :
            count = count + 1
    print(count)

judge(S)

Fixed submission:
S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
    if li[num] == "R" :
        count = count + 1

if count == 0 :
    re_num = 0
elif count == 1 :
    re_num = 1
elif count == 2 and li[1] == "S" :
    re_num = 1
elif count == 2 and li[1] == "R" :
    re_num = 2
else :
    re_num = 3

print(re_num)