Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
yyyy = int(input())
mm = int(input())
dd = int(input())
if yyyy < 2019:
    print('Heisei')
elif yyyy > 2019:
    print('TBD')
else:
    if mm < 5:
        print('Heisei')
    else:
        print('TBD')

Fixed submission:
S = input()
if S <= '2019/04/30' :
    print('Heisei' )
else:
    print('TBD')

Buggy python submission (verdict: Runtime Error):
yyyy = int(input())
mm = int(input())
dd = int(input())
if yyyy < 2019:
    print('Heisei')
    break
elif yyyy > 2019:
    print('TBD')
    break
else:
    if mm < 5:
        print('Heisei')
        break
    else:
        print('TBD')

Fixed submission:
S = input()
if S <= '2019/04/30' :
    print('Heisei' )
else:
    print('TBD')

Buggy python submission (verdict: Runtime Error):
yyyy = int(input())
mm = int(input())
dd = int(input())
if yyyy < 2019:
    print('Heisei')
elif yyyy > 2019:
    print('TBD')
else:
    if mm < 5:
        print('Heisei')
    else:
        print('TBD')

Fixed submission:
S = input()
if S <= '2019/04/30' :
    print('Heisei' )
else:
    print('TBD')

Buggy python submission (verdict: Runtime Error):
yyyy = int(input())
mm = int(input())
dd = int(input())
if yyyy < 2019:
    print('Heisei')
elif yyyy > 2019:
    print('TBD')
else:
    if mm == 1 or mm == 2 or mm == 3 or mm == 4:
        print('Heisei')
    else:
        print('TBD')

Fixed submission:
S = input()
if S <= '2019/04/30' :
    print('Heisei' )
else:
    print('TBD')

Buggy python submission (verdict: Runtime Error):
yyyy = int(input())
mm = int(input())
if yyyy < 2019:
    print('Heisei')
elif yyyy > 2019:
    print('TBD')
else:
    if mm == 1 or mm == 2 or mm == 3 or mm == 4:
        print('Heisei')
    else:
        print('TBD')

Fixed submission:
S = input()
if S <= '2019/04/30' :
    print('Heisei' )
else:
    print('TBD')

Buggy python submission (verdict: Runtime Error):
if yyyy < 2019:
    print('Heisei')
elif yyyy > 2019:
    print('TBD')
else:
    if mm == 1 or mm == 2 or mm == 3 or mm == 4:
        print('Heisei')
    else:
        print('TBD')

Fixed submission:
S = input()
if S <= '2019/04/30' :
    print('Heisei' )
else:
    print('TBD')

Buggy python submission (verdict: Runtime Error):
if yyyy < 2019:
    print('Heisei')
elif yyyy > 2019:
    print('TBD')
else:
    if mm == 01 or mm == 02 or mm == 03 or mm == 04:
        print('Heisei')
    else:
        print('TBD')

Fixed submission:
S = input()
if S <= '2019/04/30' :
    print('Heisei' )
else:
    print('TBD')

Buggy python submission (verdict: Runtime Error):
if yyyy < 2019:
    print('Heisei')
elif yyyy > 2019:
    print('TBD')
else:
    if mm < 5:
        print('Heisei')
    else:
        print('TBD')

Fixed submission:
S = input()
if S <= '2019/04/30' :
    print('Heisei' )
else:
    print('TBD')
Buggy python submission (verdict: Runtime Error):
N, T = map(int, input().split())

t = list(map(int, input().split()))

discount = 0
for i in range(N - 1):
    if t[i + 1] - t[i] < T:
        discount += (T - (t[i + 1] - t[i]))

X = N * T - discount

print(X

Fixed submission:
N, T = map(int, input().split())

t = list(map(int, input().split()))

discount = 0
for i in range(N - 1):
    if t[i + 1] - t[i] < T:
        discount += (T - (t[i + 1] - t[i]))

X = N * T - discount

print(X)
Buggy python submission (verdict: Runtime Error):
s = input()
s[4:5]='8'
print(s)

Fixed submission:
s = input()
print(s[:3]+'8'+s[4:])
Buggy python submission (verdict: Runtime Error):
n,a,b = map(int,input().split())
print(min[a*n,b])

Fixed submission:
n,a,b = map(int,input().split())
print(min(a*n,b))
Buggy python submission (verdict: Runtime Error):
list = list(map(str,inout().split()))
for x in list:
    if x=='A':
        x = 10
    elif x=='B':
        x = 11
    elif x=='C':
        x = 12
    elif x=='D':
        x = 13
    elif x=='E':
        x = 14
    elif x=='F':
        x = 15
if list[0]<list[1]:
    print('<')
elif list[0]>list[1]:
    print('>')
else:
    print('=')

Fixed submission:
list = list(map(str,input().split()))
for x in list:
    if x=='A':
        x = 10
    elif x=='B':
        x = 11
    elif x=='C':
        x = 12
    elif x=='D':
        x = 13
    elif x=='E':
        x = 14
    elif x=='F':
        x = 15
if list[0]<list[1]:
    print('<')
elif list[0]>list[1]:
    print('>')
else:
    print('=')
Buggy python submission (verdict: Runtime Error):
prices = list(map(int,input().split()))
prices.sort()
print(price[0]+price[1])

Fixed submission:
prices = list(map(int,input().split()))
prices.sort()
print(prices[0]+prices[1])

Buggy python submission (verdict: Runtime Error):
prices = list(map(int,input().split()))
price.sort()
print(price[0]+price[1])

Fixed submission:
prices = list(map(int,input().split()))
prices.sort()
print(prices[0]+prices[1])

Buggy python submission (verdict: Runtime Error):
prices = list(map(int,input().split()))
price.sort()
return(price[0]+price[1])

Fixed submission:
prices = list(map(int,input().split()))
prices.sort()
print(prices[0]+prices[1])
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if a[-1:]==b[:1] and b[-1:]==c[:1]:
    print("YES")
else:
    print("NO")

Fixed submission:
a,b,c = map(str,input().split())
if a[-1:]==b[:1] and b[-1:]==c[:1]:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
print(max[a*b,c*d])

Fixed submission:
a,b,c,d=map(int,input().split())
print(max([a*b,c*d]))
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
print(max([a*b,c*d])

Fixed submission:
a,b,c=map(str,input().split(","))
print(a,b,c)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if a==b+c:
    print("YES")
elif b==a+c:
    print("YES")
elif c=a+b:
    print("YES")
else:
    print("NO")

Fixed submission:
a,b,c = map(int,input().split())
if a==b+c:
    print("Yes")
elif b==a+c:
    print("Yes")
elif c==a+b:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
l = list(map(int,input()split()))
ans = list(dict.fromkeys(l))
print(len(ans)+1)

Fixed submission:
l = list(map(int,input().split()))
ans = list(dict.fromkeys(l))
print(len(ans))
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
h = int(input())
ans = (a+b)*h/2
print()ans

Fixed submission:
a = int(input())
b = int(input())
h = int(input())
ans = (a+b)*h/2
print(int(ans))
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
    count += i
print(count)

Fixed submission:
n = int(input())
count = 0
for i in range(n):
    count += i+1
print(count)
Buggy python submission (verdict: Runtime Error):
n = float(input())
ans = 0
if n % 2 == 0:
    ans = (n / 2) / n
else:
    ans = (n + 1) / 2) / n

print('{:.10f}'.format(ans))


Fixed submission:
n = float(input())
ans = 0
if n % 2 == 0:
    ans = (n / 2) / n
else:
    ans = ((n + 1) / 2) / n

print('{:.10f}'.format(ans))
Buggy python submission (verdict: Runtime Error):
x = input()
if x < 1200:
    print('ABC')
else:
    print('ARC')
    

Fixed submission:
x = int(input())
if x < 1200:
    print('ABC')
else:
    print('ARC')
Buggy python submission (verdict: Runtime Error):
n = list(map(int, input().split()))

ans = set(n)
print(ans.count)


Fixed submission:
n = list(int(x) for x in input().split(' '))

ans = set(n)
print(len(ans))
Buggy python submission (verdict: Runtime Error):
n, k = (int(x) for x in input().split())
count = 0
s = [[0 for i in range(n)] for j in range(k)]

for i in range(n):
    for j in range(k):
        if i == 0 or s[i][j] != s[i - 1][j]:
            count += 1

print(count)

Fixed submission:
n, k = (int(x) for x in input().split(' '))
print(k*(k-1)**(n-1))
Buggy python submission (verdict: Runtime Error):
n = int(input())
print(n*(n + 1) // 2

Fixed submission:
n = int(input())
ans = 0

for i in range(n + 1):
    ans += i

print(ans)
Buggy python submission (verdict: Runtime Error):
s = list(input())

ans = ''
for x in s:
    if x == '1' or x == '0':
        ans += x
    elif ans:
        ans[-1].remove
print(ans)

Fixed submission:
s = input()

ans = ''
for i in s:
    if i != 'B':
        ans += i
    else:
        ans = ans[:-1]
print(ans)
Buggy python submission (verdict: Runtime Error):
n, l = (int(x) for x in input().split())
s = list(str(x) for x in input().split())

s.sort()
ans = 0
while range(n + 1):
    ans += s[n]


Fixed submission:
n, l = (int(x) for x in input().split())
s = [input() for a in range(n)]
print("".join(sorted(s)))

Buggy python submission (verdict: Runtime Error):
n, l = (int(x) for x in input().split())
while range(n + 1):
    s = list(x for x in input.split())

s.sort()
ans = 0
while range(n + 1):
    ans += s[n]

Fixed submission:
n, l = (int(x) for x in input().split())
s = [input() for a in range(n)]
print("".join(sorted(s)))

Buggy python submission (verdict: Runtime Error):
n, l= (int(x) for x in input().split())
s = list(x for x in input.split())

s.sort()
ans = 0
while range(n + 1):
    ans += s[n]


Fixed submission:
n, l = (int(x) for x in input().split())
s = [input() for a in range(n)]
print("".join(sorted(s)))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = map(int,input().split())
sum = 0
a = []
for i in range(N):
  a.append(1/A[i])
  sum += a[i]

print(1/sum)

Fixed submission:
N = int(input())
A = map(float,input().split())
sum = 0

for i in A:
  a = 1/i
  
  sum += a

print(1/sum)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = []
b = []
count = 0
for i in range(n):
  s.append(input())
  a = (list(s[0]))
  a.sort()
    
  
  s.pop(0)
  b.append("".join(a))
  a.clear()

  
  
for i in range(n):
  for j in range(n-i-1):
    if b[i] == b[i+j+1]:
      count += 1

print(count)


Fixed submission:
n = int(input())
d = {}
sum = 0

for i in range(n):
  s = list(input())
  s.sort()
  t = "".join(s)
  s.clear()
  if t in d:
    d[t] += 1
  else:
    d[t] = 1
    
for i in d:
  if d[i] > 1:
    sum += (d[i]*(d[i]-1))/2

print(int(sum))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = []
a = []
b = []
count = 0
for i in range(n):
  s.append(input())
  for j in s[0]:
    a.append(j)
  a.sort()
    
  #print(a)
  s.pop(0)
  b.append("".join(a))
  a.clear()

  
  
for i in range(n):
  for j in range(n-i-1):
    if b[i] == b[i+j+1]:
      count += 1

print(count)


Fixed submission:
n = int(input())
d = {}
sum = 0

for i in range(n):
  s = list(input())
  s.sort()
  t = "".join(s)
  s.clear()
  if t in d:
    d[t] += 1
  else:
    d[t] = 1
    
for i in d:
  if d[i] > 1:
    sum += (d[i]*(d[i]-1))/2

print(int(sum))
Buggy python submission (verdict: Time Limit Exceeded):
N,R = map(int,input().split())
id = [0]*N
ans = 0
for i in range(R):
  A,B = map(int,input().split())
  for j in range(B-A+1):
    id[j+A-1]+=1
for i in id:
  if i == R:
    ans += 1
print(ans)

Fixed submission:
N,R = map(int,input().split())
min = 0
max = 10000000
ans = 0
for i in range(R):
  A,B = map(int,input().split())
  if A > min:
    min = A
  if B < max:
    max = B
if min < max:
  ans = max - min + 1
elif min == max:
  ans = 1
print(ans)
Buggy python submission (verdict: Runtime Error):
A = input()
Len = len(A)
L = (Len // 2) + (Len % 2)
count = 0
for i in range(4):
  if A[i] != A[-i-1]:
    count += 1
print(count)

Fixed submission:
A = input()
Len = len(A)
L = (Len // 2) + (Len % 2)
count = 0
for i in range(L):
  if A[i] != A[-i-1]:
    count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
inputNumN = list(map(int, input().split()))
N = inputNumN[0]
Q = inputNumN[1]

AB = {}
for i in range(N - 1):
    inputNumAB = list(map(int, input().split()))
    if not AB.get(inputNumAB[0]):
        AB[inputNumAB[0]] = []
    AB[inputNumAB[0]].append(inputNumAB[1])

PQ = {}
for i in range(Q):
    inputNumPQ = list(map(int, input().split()))
    if not PQ.get(inputNumPQ[0]):
        PQ[inputNumPQ[0]] = 0
    PQ[inputNumPQ[0]] += inputNumPQ[1]
PQ = sorted(PQ.items())

result = [0] * N

for pq in PQ:
    result[pq[0] - 1] += pq[1]

for A, B in AB.items():
    for b in B:
        result[b - 1] += result[A - 1]

for r in result:
    print(r, end=' ')


Fixed submission:
inputNumN = list(map(int, input().split()))
N = inputNumN[0]
Q = inputNumN[1]

AB = {}
for i in range(N - 1):
    inputNumAB = list(map(int, input().split()))
    if not AB.get(inputNumAB[0]):
        AB[inputNumAB[0]] = []
    AB[inputNumAB[0]].append(inputNumAB[1])

result = [0] * N
for i in range(Q):
    inputNumPQ = list(map(int, input().split()))
    result[inputNumPQ[0] - 1] += inputNumPQ[1]

for A, B in AB.items():
    for b in B:
        result[b - 1] += result[A - 1]

for r in result:
    print(r, end=' ')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

l = []
count = 0
for i in range(N):
    # 比較がしやすいようにソートしたものを追加
    s = sorted(input())
    for j in range(i):
        if l[j] == s:
            count += 1
    l.append(s)

print(count)


Fixed submission:
N = int(input())

s = ''.join(sorted(input()))
h = {s: 1}
count = 0
for i in range(N - 1):
    # 比較がしやすいようにソートしたものを追加
    s = ''.join(sorted(input()))
    if s in h:
        count += h[s]
        h[s] += 1
    else:
        h[s] = 1

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

s = []
for i in range(N):
    # 比較がしやすいようにソートしたものを追加
    s.append(sorted(input()))

count = 0
for i in range(len(s)):
    for j in range(i + 1, len(s)):
        if s[i] == s[j]:
            count += 1

print(count)


Fixed submission:
N = int(input())

s = ''.join(sorted(input()))
h = {s: 1}
count = 0
for i in range(N - 1):
    # 比較がしやすいようにソートしたものを追加
    s = ''.join(sorted(input()))
    if s in h:
        count += h[s]
        h[s] += 1
    else:
        h[s] = 1

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

s = []
dictList = []
for i in range(N):
    d = {}
    # 受け取った文字列を辞書型に{文字: 数}
    s.append(input())
    for c in s[i]:
        if c in d:
            d[c] += 1
        else:
            d[c] = 1
    # 比較がしやすいようにソートしたものを追加
    dictList.append(sorted(d.items()))

count = 0
for i in range(len(dictList)):
    for j in range(i+1, len(dictList)):
        if dictList[i] == dictList[j]:
            count += 1

print(count)

Fixed submission:
N = int(input())

s = ''.join(sorted(input()))
h = {s: 1}
count = 0
for i in range(N - 1):
    # 比較がしやすいようにソートしたものを追加
    s = ''.join(sorted(input()))
    if s in h:
        count += h[s]
        h[s] += 1
    else:
        h[s] = 1

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

count = 1
answer = [0] * len(S)
# RLの切り替わるインデックスをマーク
n = 0
for i in range(len(S) - 1):
    if (S[i] == S[i + 1]):
        count += 1
    else:
        if (S[i + 1] == 'R'):
            # Lを割り振る
            answer[n] += count // 2
            answer[n + 1] += -(-count // 2)
            count = 1
        else:
            # Rを割り振る
            answer[i] += -(-count // 2)
            answer[i + 1] += count // 2
            count = 1
            n = i
    # 右端のLを割り振る
    if (i == len(S) - 2):
        answer[n] += count // 2
        answer[n + 1] += -(-count // 2)

for c in answer:
    print(f"{c} ", end='')
print()


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

A = inputNum[0]
B = inputNum[1]
C = inputNum[2]

if ((C - (A - B)) > 0):
    print(C - (A - B))
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=list(map(int, input().split()))

L.sort()
L.reverse()
#print(L)
count=0

for i in range(N-2):
  for j in range(i+1,N-1):
    for k in range(j+1,N):
      if L[k]>L[i]-L[j]:
          count +=1
      else:
        break
            
print(count)
        


Fixed submission:
import bisect

N=int(input())
L=list(map(int, input().split()))

L.sort()
#print(L)
count=0

for i in reversed(range(2,N)):
  for j in reversed(range(1,i)):
    index=bisect.bisect_right(L,L[i]-L[j])
    #print(index,j,i)
    if index<j:
     count += j-index
            
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=list(map(int, input().split()))

L.sort()
L.reverse()
#print(L)
count=0

for i in range(N-2):
  cond=0
  for j in range(i+1,N-1):
    if cond==1:
      break
    for k in range(j+1,N):
      if L[i]<L[j]+L[k]:
        if L[j]<L[i]+L[k]:
          if L[k]<L[i]+L[j]:
            count +=1
      else:
        cond=1
        break
            
print(count)
        


Fixed submission:
import bisect

N=int(input())
L=list(map(int, input().split()))

L.sort()
#print(L)
count=0

for i in reversed(range(2,N)):
  for j in reversed(range(1,i)):
    index=bisect.bisect_right(L,L[i]-L[j])
    #print(index,j,i)
    if index<j:
     count += j-index
            
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=list(map(int, input().split()))

#print(N,L)
count=0

for i in range(N-2):
  for j in range(i+1,N-1):
    for k in range(j+1,N):
      if L[i]<L[j]+L[k]:
        if L[j]<L[i]+L[k]:
          if L[k]<L[i]+L[j]:
            count +=1
            
print(count)
        


Fixed submission:
import bisect

N=int(input())
L=list(map(int, input().split()))

L.sort()
#print(L)
count=0

for i in reversed(range(2,N)):
  for j in reversed(range(1,i)):
    index=bisect.bisect_right(L,L[i]-L[j])
    #print(index,j,i)
    if index<j:
     count += j-index
            
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q=map(int, input().split())
#print(N,K,Q)
A=list()
for j in range(Q):
  A.append(int(input()))

#print(A)
#C=list()
for j in range(N):
  if Q-A.count(j+1)<K:
    print('Yes')
  else:
    print('No')
 
#print(C)




Fixed submission:
N,K,Q=map(int, input().split())
score=[Q]*N
#print(score)
for j in range(Q):
  c=int(input())
  score[c-1] += -1
 
#print(score)

for j in range(N):
  if score[j]<K:
    print('Yes')
  else:
    print('No')

Buggy python submission (verdict: Time Limit Exceeded):
import collections

N,K,Q=map(int, input().split())
#print(N,K,Q)

if K>Q:
  for j in range(N):
    print('Yes')
else:    
 A=list()
 for j in range(Q):
   A.append(int(input()))

 for k in range(N):
  score=K
  cond=0
  for j in range(Q):
   if k+1 != A[j]:
    score=score-1
   if score<=0:
      print('No')
      cond=1
      break
  if cond==0:
    print('Yes')
  
  

Fixed submission:
N,K,Q=map(int, input().split())
score=[Q]*N
#print(score)
for j in range(Q):
  c=int(input())
  score[c-1] += -1
 
#print(score)

for j in range(N):
  if score[j]<K:
    print('Yes')
  else:
    print('No')

Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q=map(int, input().split())
#print(N,K,Q)

if K>Q:
  for j in range(N):
    print('Yes')
else:    
 A=list()
 for j in range(Q):
   A.append(int(input()))

#print(A)
#C=list()
 for j in range(N):
   if Q-A.count(j+1)<K:
     print('Yes')
   else:
     print('No')
 




Fixed submission:
N,K,Q=map(int, input().split())
score=[Q]*N
#print(score)
for j in range(Q):
  c=int(input())
  score[c-1] += -1
 
#print(score)

for j in range(N):
  if score[j]<K:
    print('Yes')
  else:
    print('No')

Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q=map(int, input().split())
#print(N,K,Q)
A=list()
for j in range(Q):
  A.append(int(input()))

#print(A)
#C=list()
for j in range(N):
  if Q-A.count(j+1)<K:
    print('Yes')
  else:
    print('No')
 
#print(C)




Fixed submission:
N,K,Q=map(int, input().split())
score=[Q]*N
#print(score)
for j in range(Q):
  c=int(input())
  score[c-1] += -1
 
#print(score)

for j in range(N):
  if score[j]<K:
    print('Yes')
  else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())

string=list()
for i in range(N):
  c=list(input())
  c.sort()
 # print(''.join(c))
  string.append(''.join(c))
  
#print(string)

count=0
M=N
for j in range(N):
  s=string[0]
  c=string.count(s)
  M=M-c
  count=count +int(c*(c-1)/2)
  for k in range(c):
   string.remove(s)
  if j+1>M-1:
    break
  
print(count)
  

Fixed submission:
import collections
N=int(input())

string=list()
for i in range(N):
  c=list(input())
  c.sort()
 # print(''.join(c))
  string.append(''.join(c))
  
#print(string)

a=collections.Counter(string)
b=list(a.values())

count=0
for j in range(len(b)):
  count=count +int(b[j]*(b[j]-1)/2)
  
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
S=int(input())
cond=0

if S<=10**9:
 print(0,0,1,0,0,S)
else:
 for x2 in reversed(range(1,10**9+1)):
   if int(S/x2)+1 <=10**9:
      print(0,0,x2,1,x2-S%x2,int(S/x2)+1)
      break



Fixed submission:
S=int(input())
cond=0

if S<=10**9:
 print(0,0,1,0,0,S)
elif S==10**18:
 print(0,0,10**9,0,0,10**9)
else:
 for x2 in reversed(range(1,10**9+1)):
   if int(S/x2)+1 <=10**9:
      print(0,0,x2,1,x2-S%x2,int(S/x2)+1)
      break

Buggy python submission (verdict: Time Limit Exceeded):
S=int(input())
cond=0

if S<=10**9:
 print(0,0,1,0,0,S)
else:
 for x2 in reversed(range(1,10**9+1,3)):
   if int(S/x2)>0 and int(S/x2)+1 <=10**9:
      print(0,0,x2,1,x2-S%x2,int(S/x2)+1)
      break



Fixed submission:
S=int(input())
cond=0

if S<=10**9:
 print(0,0,1,0,0,S)
elif S==10**18:
 print(0,0,10**9,0,0,10**9)
else:
 for x2 in reversed(range(1,10**9+1)):
   if int(S/x2)+1 <=10**9:
      print(0,0,x2,1,x2-S%x2,int(S/x2)+1)
      break

Buggy python submission (verdict: Time Limit Exceeded):
S=int(input())
cond=0

if S<=10**9:
 print(0,0,1,0,0,S)
else:
 for x2 in reversed(range(1,10**9+1,10)):
   if int(S/x2)>0 and int(S/x2)+1 <=10**9:
      print(0,0,x2,1,x2-S%x2,int(S/x2)+1)
      break



Fixed submission:
S=int(input())
cond=0

if S<=10**9:
 print(0,0,1,0,0,S)
elif S==10**18:
 print(0,0,10**9,0,0,10**9)
else:
 for x2 in reversed(range(1,10**9+1)):
   if int(S/x2)+1 <=10**9:
      print(0,0,x2,1,x2-S%x2,int(S/x2)+1)
      break

Buggy python submission (verdict: Time Limit Exceeded):
S=int(input())
cond=0

if S<=10**9:
 print(0,0,1,0,0,S)
else:
 for x2 in reversed(range(1,10**9+1)):
   if int(S/x2)>0 and int(S/x2)+1 <=10**9:
      print(0,0,x2,1,x2-S%x2,int(S/x2)+1)
      break



Fixed submission:
S=int(input())
cond=0

if S<=10**9:
 print(0,0,1,0,0,S)
elif S==10**18:
 print(0,0,10**9,0,0,10**9)
else:
 for x2 in reversed(range(1,10**9+1)):
   if int(S/x2)+1 <=10**9:
      print(0,0,x2,1,x2-S%x2,int(S/x2)+1)
      break
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())

power=1
for i in range(N):
  power=power*(i+1)
  
print(power%(10**9+7))

Fixed submission:
N=int(input())

power=1
for i in range(N):
  if power>10**9+7:
    power=(power%(10**9+7))*(i+1)
  else:
    power=power*(i+1)
 
print(power%(10**9+7))
#print(power%(10**9+7))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a + b + c < 22:
    print('win')
else:
    ptint('bust')

Fixed submission:
a, b, c = map(int, input().split())
if a + b + c < 22:
    print('win')
else:
    print('bust')
Buggy python submission (verdict: Runtime Error):
s = input()
sb = s[:len(s)//2]
if len(s) % 2 == 1:
    sa = s[len(s)//2+1:]
else:
    sa = s[len(s)//2:]
sa = [::-1]
cnt = 0
for b in sb:
    for a in sa:
        if b != a:
            cnt += 1
        break
print(cnt)

Fixed submission:
import sys

s = input()
if len(s) == 1:
    print(0)
    sys.exit(0)

sb = s[:len(s)//2]
if len(s) % 2 == 1:
    sa = s[len(s)//2+1:]
else:
    sa = s[len(s)//2:]
sa = sa[::-1]

cnt = 0
for i,b in enumerate(sb):
    if b != sa[i]:
        cnt += 1
print(cnt)