Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02719 (python)

Fixed submission:
def getInput():
    return [int(i) for i in input().rstrip().split(' ')]

N, K = getInput()
t = N % K 
print(min(t, K -t))

Buggy submission (verdict: Runtime Error):
def getInput():
    return [int(i) for i in input().rstrip().split(' ')]

def swap(x, K):
    return abs(x-K)

def loops (x, K, mins):
    if x < K:
        ab = swap(x, K)
        return min(ab, x)
    elif x % K == 0:
        return 0
    else:
        x = swap(x, K)
        if x == 0:
            return x
        if x < mins:
            mins = x
            x = loops(x, K, mins)
            return x
        else:
            return mins

N, K = getInput()
x = N
print(loops(x, K, x))

Buggy submission (verdict: Runtime Error):
def getInput():
    return [int(i) for i in input().rstrip().split(' ')]

def swap(x, K):
    return abs(x-K)

def loops (x, K, mins):
    if x < K:
        ab = swap(x, K)
        return min(ab, x)
    elif x % K == 0:
        return 0
    else:
        x = swap(x, K)
        if x < mins:
            mins = x
            x = loops(x, K, mins)
            return x
        else:
            return mins

N, K = getInput()
x = N
print(loops(x, K, x))

Buggy submission (verdict: Runtime Error):
def getInput():
    return [int(i) for i in input().rstrip().split(' ')]

def swap(x, K):
    return abs(x-K)

def loops (x, K):
    if x < K:
        ab = swap(x, K)
        return min(ab, x)
    elif x % K == 0:
        return 0
    else:
        x = swap(x, K)
        x = loops(x, K)
        return x

N, K = getInput()
x = N
print(loops(x, K))
Problem p03493 (python)

Fixed submission:
arr = [int(i) for i in list(input())]
print(sum(arr))

Buggy submission (verdict: Runtime Error):
def calc(c, cnt):
    r = [i % 2 for i in c]
    if sum(r) > 0:
        print(cnt)
        return 1
    else:
        for k, num in enumerate(c):
            c[k] = num / 2
        cnt += 1
        if calc(c, cnt) == 1:
            return 1
        

N = int(input())
c = [int(i) for i in input().rstrip().split(' ')]
calc(c, 0)
Problem p02621 (python)

Fixed submission:
i = int(input())
print(i*i*i+i*i+i)

Buggy submission (verdict: Runtime Error):
int = int(input())
print(a*a*a+a*a+a)
Problem p02628 (python)

Fixed submission:
i = list(map(int, input().split()))
s = list(map(int, input().split()))

out=0
s = sorted(s)
for i in range(i[1]):
  out+=s[i]
print(out)

Buggy submission (verdict: Runtime Error):
i = list(map(int, input().split()))
s = list(map(int, input().split()))

out=0
s = sorted(s)
for i in range(3):
  out+=s[i]
print(out)
Problem p02720 (python)

Fixed submission:
K = int(input())

queue = list(range(1, 10))

if K < 10:
    print(K)
else:
    i = 0
    while K > len(queue):
        if queue[i] % 10 != 0:
            l = 10 * queue[i] + queue[i] % 10 - 1
            queue.append(l)
        
        l = 10 * queue[i] + queue[i] % 10
        queue.append(l)
        
        if queue[i] % 10 != 9:
            l = 10 * queue[i] + queue[i] % 10 + 1
            queue.append(l)
        
        i += 1

    print(queue[K - 1])

Buggy submission (verdict: Runtime Error):
K = int(input())

queue = list(range(1, 10))

if K < 10:
    print(K)
else:
    i = 0
    while K > len(queue):
        if queue[i] % 10 != 0:
            l = 10 * queue[i] + queue[i] % 10 - 1
            queue.append(l)
        
        l = 10 * queue[i] + queue[i] % 10
        queue.append(l)
        
        if queue[i] % 10 != 9:
            l = 10 * queue[i] + queue[i] % 10 + 1
            queue.append(l)
        
        i += 1

    print(queue[K])
Problem p02756 (python)

Fixed submission:
from collections import deque
import copy
s = input()
q_ = int(input())
query = [input().split() for _ in range(q_)]
l = deque(s)
flag = 0

for q in query:
    if q[0] == '1':
        flag += 1
        continue
    elif q[0] == '2':
        if (int(q[1]) + flag) % 2 == 1:
            l.appendleft(q[2])
        else:
            l.append(q[2])

if flag % 2 == 1:
    l.reverse()

print(''.join(l))

Buggy submission (verdict: Runtime Error):
from collections import deque
import copy
s = input()
q_ = int(input())
query = [input().split() for _ in range(q_)]
l = deque([s])

for q in query:
    if q[0] == '1':
        ll = copy.deepcopy(l)
        l = [''.join(ll)[::-1]]
    elif q[0] == '2':
        if q[1] == '1':
            l.appendleft(q[2])
        else:
            l.append(q[2])

print(''.join(l))

Buggy submission (verdict: Runtime Error):
from collections import deque
import copy
s = input()
q_ = int(input())
query = [input().split() for _ in range(q_)]
l = deque([s])

for q in query:
    if q[0] == '1':
        l = copy.deepcopy([''.join(l)[::-1]])
    elif q[0] == '2':
        if q[1] == '1':
            l.appendleft(q[2])
        else:
            l.append(q[2])

print(''.join(l))

Buggy submission (verdict: Runtime Error):
from collections import deque
s = input()
q_ = int(input())
query = [input().split() for _ in range(q_)]
l = deque([s])

for q in query:
    if q[0] == '1':
        l = [''.join(l)[::-1]]
    elif q[0] == '2':
        if q[1] == '1':
            l.appendleft(q[2])
        else:
            l.append(q[2])

print(''.join(l))

Buggy submission (verdict: Runtime Error):
from collections import deque
s = input()
q_ = int(input())
query = [input().split() for _ in range(q_)]
l = deque([s])

for q in query:
    if q[0] == '1':
        s = ''.join(l)
        s = s[::-1]
        l = [s]
    elif q[0] == '2':
        if q[1] == '1':
            l.appendleft(q[2])
        else:
            l.append(q[2])

print(''.join(l))
Problem p02612 (python)

Fixed submission:
n = int(input())
x = n % 1000
if x == 0:
    print(x)
else:
    print(1000 - x)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n % 1000 == 0:
  return 0
return 1000 - (n % 1000)
Problem p02985 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**9)
N, K = map(int, input().split())
mod = 10**9 + 7
G = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
def p(n, k):
    x = 1
    for i in range(k):
        x *= n - i
        x %= mod
    return x
def f(x, par):
    L = len(G[x])
    if x == par:
        if L <= K-1:
            ans = K*p(K-1,L) % mod
        else:
            return 0
    elif x != par:
        if L-1 <= K-2:
            ans = p(K-2,L-1)
        else:
            return 0
    for i in G[x]:
        if i != par:
            ans *= f(i, x)
            ans %= mod
    return ans
print(f(0, 0))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
mod = 10**9 + 7
G = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
def p(n, k):
    x = 1
    for i in range(k):
        x *= n - i
        x %= mod
    return x
def f(x, par):
    L = len(G[x])
    if x == par:
        if L <= K-1:
            ans = K*p(K-1,L) % mod
        else:
            return 0
    elif x != par:
        if L-1 <= K-2:
            ans = p(K-2,L-1)
        else:
            return 0
    for i in G[x]:
        if i != par:
            ans *= f(i, x)
            ans %= mod
    return ans
print(f(0, 0))
Problem p03030 (python)

Fixed submission:
N = int(input())
SP = sorted([(input().split(), i) for i in range(N)], key=lambda x:(x[0][0], -int(x[0][1])))
for i in range(N):
    print(SP[i][1]+1)

Buggy submission (verdict: Runtime Error):
N = int(input())
SP = sorted([(*input().split(), i) for i in range(N)], key=lambda x:(x[0], -int(x[1])))
for i in range(N):
    print(SP[i][2]+1)
Problem p03044 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**5)

n = int(input())
t = {i:{} for i in range(n)}
ans = [-1]*n
for _ in range(n-1):
    u, v, w = map(int, input().split())
    t[u-1][v-1] = w
    t[v-1][u-1] = w

def dfs(x):
    for y in t[x]:
        del t[y][x]
        ans[y] = ans[x] if t[x][y] % 2 == 0 else 1-ans[x]
        if len(t[y]) > 0:
            dfs(y)

ans[0] = 0
dfs(0)
for i in range(n):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
n = int(input())
t = {i:{} for i in range(n)}
ans = [-1]*n
for _ in range(n-1):
    u, v, w = map(int, input().split())
    t[u-1][v-1] = w
    t[v-1][u-1] = w

def dfs(x):
    for y in t[x]:
        del t[y][x]
        ans[y] = ans[x] if t[x][y] % 2 == 0 else 1-ans[x]
        if len(t[y]) > 0:
            dfs(y)

ans[0] = 0
dfs(0)
for i in range(n):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
n = int(input())
t = {i:{} for i in range(n)}
ans = [-1]*n
for _ in range(n-1):
    u, v, w = map(int, input().split())
    t[u-1][v-1] = w
    t[v-1][u-1] = w

def dfs(x):
    for y in t[x]:
        del t[y][x]
        ans[y] = ans[x] if t[x][y] % 2 == 0 else 1-ans[x]
        dfs(y)

ans[0] = 0
dfs(0)
for i in range(n):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
n = int(input())
t = {i:{} for i in range(n)}
ans = [-1]*n
for _ in range(n-1):
    u, v, w = map(int, input().split())
    t[u-1][v-1] = w
    t[v-1][u-1] = w

def dfs(x):
    for y, w in t[x].items():
        del t[y][x]
        ans[y] = ans[x] if w % 2 == 0 else 1-ans[x]
        dfs(y)

ans[0] = 0
dfs(0)
for i in range(n):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
n = int(input())
t = {i:[] for i in range(n)}
ans = [-1]*n
for _ in range(n-1):
    u, v, w = map(int, input().split())
    t[u-1].append((v-1, w))
    t[v-1].append((u-1, w))

def dfs(x):
    for y, w in t[x]:
        if ans[y] == -1:
            ans[y] = ans[x] if w % 2 == 0 else 1-ans[x]
            dfs(y)

ans[0] = 0
dfs(0)
for i in range(n):
    print(ans[i])
Problem p03106 (python)

Fixed submission:
A, B, K = map(int, input().split())
print([i for i in reversed(range(1, max(A,B)+1)) if A % i == 0 and B % i == 0][K-1])

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
print([i for i in range(1, max(A,B)+1) if A % i == 0 && B % i == 0][K-1])
Problem p03480 (python)

Fixed submission:
S=input()
N=K=len(S)
for i in range(1,N):
    if S[i-1]!=S[i]:
        K=min(K,max(i,N-i))
print(K)

Buggy submission (verdict: Runtime Error):
S=input()
N=len(S)
print(min([max(i,N-i) for i in range(1,N) if S[i-1]!=S[i]]))

Buggy submission (verdict: Runtime Error):
S=input()
N=len(S)
print(min(max(i,N-i) for i in range(1,N) if S[i-1]!=S[i]))
Problem p03488 (python)

Fixed submission:
s=list(map(len,input().split("T")))
x,y=map(int,input().split())
def f(t,w):
    m=[{} for i in range(len(t)+1)]
    m[0][0]=1
    for i in range(len(t)):
        for z in m[i]:
            m[i+1][z+t[i]]=1
            m[i+1][z-t[i]]=1
    return w in m[len(t)]
print(["No","Yes"][f(s[2::2],x-s[0]) and f(s[1::2],y)])

Buggy submission (verdict: Runtime Error):
s=list(map(len,input().split("T")))
x,y=map(int,input().split())
def f(i,w):
    if i==0:
        return w==0
    if (i,w) not in m:
        m[(i,w)]=f(i-1,w-t[i-1]) or f(i-1,w+t[i-1])
    return m[(i,w)]
m={}
t=sorted(s[2::2])
a=f(len(t),x-s[0])
m={}
t=sorted(s[1::2])
print(["No","Yes"][a and f(len(t),y)])

Buggy submission (verdict: Runtime Error):
s=list(map(len,input().split("T")))
x,y=map(int,input().split())
def f(t,i,w):
    if i==0:
        return w==0
    return f(t,i-1,w-t[i-1]) or f(t,i-1,w+t[i-1])
print(["No","Yes"][f(sorted(s[2::2]),len(s[2::2]),x-s[0]) and f(sorted(s[1::2]),len(s[1::2]),y)])
Problem p03495 (python)

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
B = {i:0 for i in set(A)}
for a in A:
    B[a] += 1
print(sum(sorted(B.values())[:-K]))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(reversed(sorted([A.count(b) for b in set(A)])))
print(sum(C[K:len(C)]))
Problem p03556 (python)

Fixed submission:
import numpy as np
import math
N = int(input())
print(math.floor(np.sqrt(N))**2)

Buggy submission (verdict: Runtime Error):
import numpy as np
import math
N = int(input())
print(math.floor(np.sqrt(N))**2)
Problem p02641 (python)

Fixed submission:
import math

x, n = map(int, input().split())
p = list(map(int, input().split()))

pnt_big = 0
pnt_small = 0
ans_big = 100
ans_small = 100
for i in range(101):
    if p.count(x+i) == 0:
        ans_big = x+i
        pnt_big = 1
    if p.count(x-i) == 0:
        ans_small = x-i
        pnt_small = 1
    if pnt_small == 1 or pnt_big == 1:
        break

if pnt_big ==1 and pnt_small == 1:
    print(ans_small)
if pnt_big == 0 and pnt_small == 1:
    print(ans_small)
if pnt_big == 1 and pnt_small == 0:
    print(ans_big)

Buggy submission (verdict: Runtime Error):
import math

x, n = map(int, input().split())
p = list(map(int, input().split()))

pnt_big = 0
pnt_small = 0
for i in range(101):
    if p.count(x+i) == 0:
        ans_big = x+i
        pnt_big = 1
    if p.count(x-i) == 0:
        ans_small = x-i
        pnt_small = 1
    if pnt_small == 1 or pnt_big == 1:
        break

if pnt_big == pnt_small:
    print(ans_small)
else:
    print(ans_big)

Buggy submission (verdict: Runtime Error):
import math

x, n = map(int, input().split())
p = list(map(int, input().split()))

p.sort()
pnt_big = 0
pnt_small = 0
for i in range(100):
    if p.count(x+i) == 0:
        ans_big = x+i
        pnt_big = 1
    if p.count(x-i) == 0:
        ans_small = x-i
        pnt_small = 1
    if pnt_small == 1 or pnt_big == 1:
        break

if pnt_big == pnt_small:
    print(ans_small)
else:
    print(ans_big)

Buggy submission (verdict: Runtime Error):
import math

x, n = map(int, input().split())
p = list(map(int, input().split()))

p.sort()
pnt_big = 0
pnt_small = 0
for i in range(x+1):
    if p.count(x+i) == 0:
        ans_big = x+i
        pnt_big = 1
    if p.count(x-i) == 0:
        ans_small = x-i
        pnt_small = 1
    if pnt_small == 1 or pnt_big == 1:
        break

if pnt_big == pnt_small:
    print(ans_small)
else:
    print(ans_big)
Problem p03161 (python)

Fixed submission:
n,k  = map(int,input().split())
h = list(map(int,input().split()))
dp = [0] * n
dp[0] = 0 # 最初のdpのコストを0にする
  
for i in range(1, n):
    dp[i] = min(dp[j] + abs(h[j] - h[i]) for j in range(max(0, i-k), i))
print(dp[-1])

Buggy submission (verdict: Runtime Error):
n,k  = map(int,input().split())
h = list(map(int,input().split()))
dp = [0] * n
dp[0] = 0 # 最初のdpのコストを0にする

# dp(0)~dp(i)（dp(i)+hm-hi以外）の値を求める
for i in range (1, k):
    dp[i] = abs(h[i] - h[0])

# dp(i)+hm-hiの値を求める    
for i in range(1, n):
    dp[i] = min(dp[j] + abs(h[j] - h[i]) for j in range(max(0, i-k), i))
print(dp[-1])
Problem p02640 (python)

Fixed submission:
import sys

x,y = map(int,input().split())
if y % 2 != 0:
    print('No')
    sys.exit()

if 4 * x < y:
    print('No')
    sys.exit()

if 4 * x >= y:
    if 2 * x <= y:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
import sys
x,y = map(int,input().split())if y % x != 0:
    print('No')
    sys.exit()
if 2**x >= y:
    print('Yes')
else:
    print('No')
Problem p02658 (python)

Fixed submission:
import sys

t = 10**18


n=int(input())
li = list(map(int,input().split()))

if li.count(0) >= 1:
    print(0)
    sys.exit()

ans = 1
for i in range(n):
    ans = ans*li[i]
    if ans > t:
        print(-1)
        sys.exit()

print(ans)

Buggy submission (verdict: Runtime Error):
import sys
from operator import mul
from functools import reduce

t = 10**18

n=int(input())
li = list(map(int,input().split()))

re = reduce(mul,li)

if ans > t:
    print(-1)
else:
    print(ans)
Problem p02664 (python)

Fixed submission:
import sys
t=list(input())

if t[-1] == '?':
    t[-1] = 'D'

if len(t) == 1:
    pass
else:
    for i in range(len(t)):
        if i == 0 and t[i+1] == 'P' and t[0] == '?':
            t[i] = 'D'
            continue
        elif i == 0 and t[0] == '?':
            t[i] = 'P'
            continue
        try:
            if t[i-1] == 'P' and t[i] == '?':
                t[i] = 'D'
            elif t[i-1] == 'D' and t[i+1] == 'D' and t[i] == '?':
                t[i] = 'P'
            elif t[i-1] == 'D' and t[i+1] == 'P' and t[i] == '?':
                t[i] = 'D'
            elif t[i-1] == 'D' and t[i+1] == '?' and t[i] == '?':
                t[i] = 'P'
        except IndexError:
            pass

print(''.join(t))

Buggy submission (verdict: Runtime Error):
t=list(input())

if t[-1] == '?':
    t[-1] = 'D'

for i in range(len(t)):
    if i == 0 and t[i+1] == 'P' and t[0] == '?':
        t[i] = 'D'
        continue
    elif i == 0 and t[0] == '?':
        t[i] = 'P'
        continue
    try:
        if t[i-1] == 'P' and t[i] == '?':
            t[i] = 'D'
        elif t[i-1] == 'D' and t[i+1] == 'D' and t[i] == '?':
            t[i] = 'P'
        elif t[i-1] == 'D' and t[i+1] == 'P' and t[i] == '?':
            t[i] = 'D'
        elif t[i-1] == 'D' and t[i+1] == '?' and t[i] == '?':
            t[i] = 'P'
    except IndexError:
        pass

print(''.join(t))

Buggy submission (verdict: Runtime Error):
t=list(input())

if t[-1] == '?':
    t[-1] = 'D'

for i in range(len(t)):
    if i == 0 and t[i+1] == 'P' and t[0] == '?':
        t[i] = 'D'
        continue
    elif i == 0 and t[0] == '?':
        t[i] = 'P'
    try:
        if t[i-1] == 'P' and t[i] == '?':
            t[i] = 'D'
        elif t[i-1] == 'D' and t[i+1] == 'D' and t[i] == '?':
            t[i] = 'P'
        elif t[i-1] == 'D' and t[i+1] == 'P' and t[i] == '?':
            t[i] = 'D'
        elif t[i-1] == 'D' and t[i+1] == '?' and t[i] == '?':
            t[i] = 'P'
    except IndexError:
        pass

print(''.join(t))
Problem p03610 (python)

Fixed submission:
from sys import stdin

s = list(input())
result = ""

for ch in range(0,len(s)):
    if (ch + 1) % 2 != 0:
        result += s[ch]
    else:
        pass

print(result)

Buggy submission (verdict: Runtime Error):
S = list(input())
print(S)

for v in S[0::2]
    print(v)
Problem p02717 (python)

Fixed submission:
X,Y,Z= map(int,input().split())

print(Z,X,Y)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = list(map(int,input().split()))

ans = 0

for i in range(N):
  if A[i] >= 1/4*M:
    ans += 1
  else:
    pass
  
  
  

if ans >= M:
  print('Yes')
  
else:
  print('No')
Problem p02755 (python)

Fixed submission:
import math

A,B = map(int,input().split())

a = []
b = []

for i in range(1,1001):
  if math.floor(i*0.08) == A:
    a.append(i)
    
  else:
    pass

for i in range(1,1001):
  if math.floor(i*0.1) == B:
    b.append(i)
    
  else:
    pass
   
a_and_b = set(a) & set(b)


if len(a_and_b) == 0:
  print(-1)
else:
  print(min(a_and_b))

Buggy submission (verdict: Runtime Error):
import math

A,B = map(int,input().split())

a = []
b = []

for i in range(1,1001):
  if math.floor(i*0.08) == A:
    a.append(i)
    
  else:
    pass

for i in range(1,1001):
  if math.floor(i*0.1) == B:
    b.append(i)
    
  else:
    pass
   
a_and_b = set(a) & set(b)

print(min(a_and_b))
Problem p02885 (python)

Fixed submission:
A,B = list(map(int,input().split()))

if A >= B*2:
  print(A-B*2)
  
else:
  print(0)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = list(input())

slime = 1

for i in range(0,N-1):
  if S[i] != S[i+1]:
    slime += 1
  else:
    slime += 0
    
print(slime)
Problem p03943 (python)

Fixed submission:
A  = list(map(int,input().split()))

a = sorted(A)

if a[2]==a[0]+a[1]:
  print('Yes')
  
else:
  print('No')

Buggy submission (verdict: Runtime Error):
A  = list(map(int,input().split()))

a = sorted(A)

if a[2]=a[0]+a[1]:
  print('Yes')
  
else:
  print('No')
Problem p02801 (python)

Fixed submission:
print(chr(ord(input())+1))

Buggy submission (verdict: Runtime Error):
from sys import stdin
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
def ii(): return int(stdin.readline())
def fi(): return float(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def fmi(): return map(float, stdin.readline().split())
def li(): return list(mi())
def lsi():
	x=list(stdin.readline())
	x.pop()
	return x
def si(): return stdin.readline()
def sieve(x):
	a=[True]*(x+1)
	sq=floor(sqrt(x))
	for i in range(3, sq+1, 2):
		if a[i]:
			for j in range(i*i, x+1, i):
				a[j]=False
	if x>1:
		p=[2]
	else:
		p=[]
	for i in range(3, x+1, 2):
		if a[i]:
			p.append(i)
	return p
#vowel={'a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y'}
#pow=[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904, 9223372036854775808]
############# CODE STARTS HERE #############
print(chr(ord(input())+1))
Problem p02861 (python)

Fixed submission:
from sys import stdin
#from collections import deque
from math import sqrt
def ii(): return int(stdin.readline())
def fi(): return float(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def fmi(): return map(float, stdin.readline().split())
def li(): return [x for x in mi()]
def si(): return stdin.readline()
def dis(x, y, p, q):
    return sqrt((x-p)**2+(y-q)**2)
a=[]
s=0
n=ii()
fn=1
for i in range(1, n+1):
    fn*=i
fn//=2
for _ in range(n):
    x, y=mi()
    a.append([x, y])
for i in range(n-1):
    for j in range(i+1, n):
        s+=dis(a[i][0], a[i][1], a[j][0], a[j][1])
        #print(s)
print(2*s/n)

Buggy submission (verdict: Runtime Error):
from sys import stdin
#from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd
def ii(): return int(stdin.readline())
def fi(): return float(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def fmi(): return map(float, stdin.readline().split())
def li(): return [x for x in mi()]
def si(): return stdin.readline()
def dis(x, y, p, q):
    return sqrt((x-p)**2+(y-q)**2)
a=[]
s=0
n=ii()
fn=1
for i in range(1, n+1):
    fn*=i
fn//=2
for _ in range(n):
    x, y=mi()
    a.append([x, y])
for i in range(n-1):
    for j in range(i+1, n):
        s+=dis(a[i][0], a[i][1], a[j][0], a[j][1])
        #print(s)
print(2*s/n)
Problem p02983 (python)

Fixed submission:
l, r=map(int, input().split())
x, y=l//2019, r//2019
p=0
if x==y:
	p=2019
	for i in range(l, r):
		for j in range(i+1, r+1):
			p=min(p, (((i%2019)*(j%2019))%2019))
print(p)

Buggy submission (verdict: Runtime Error):
l, r=map(int, input().split())
if r-l>672:
	p=0
else:
	x=[]
	for i in range(l, r):
		for j in range(i+1, r+1):
			x.append(i*j%2019)
			if not p:
				break
		if not p:
			break
	p=min(x)
print(p)