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

Fixed submission:
import copy
import collections
import math
 
N = int(input())
A = [int(i) for i in input().split()] 
 
maxnum = max(A)
lis = [-1] * maxnum
bigC = collections.Counter(A)
for i, a in enumerate(A):
  if lis[a-1] < 0:
    newA = copy.deepcopy(A)
    newA.pop(i)
    c = collections.Counter(newA)
    total = 0
    for idx in c:
      num = c[idx]
      total += num * (num-1) // 2
      
    lis[a-1] = total
    for x in bigC:
      if bigC[x] == bigC[a]:
        lis[x-1] = total
      
    print(total)
  else:
    print(lis[a-1])

Buggy submission (verdict: Runtime Error):
import copy
import collections
import math
import sys
import numpy as np

def combinations_count(n, r):
    if n <= 1:
        return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

N = int(input())
A = [int(i) for i in input().split()] 

bigC = collections.Counter(A)
vals = np.array(list(bigC.values()))
if (vals >= 2).any() == False:
  for _ in range(N):
    print(0)
  sys.exit()

maxnum = max(A)
lis = [-1] * maxnum
for i, a in enumerate(A):
  if lis[a-1] < 0:
    newA = copy.deepcopy(A)
    newA.pop(i)
    c = collections.Counter(newA)
    total = 0
    for idx in c:
      total += combinations_count(c[idx], 2)
      
    lis[a-1] = total
    for x in bigC:
      if bigC[x] == bigC[a]:
        lis[x-1] = total
    print(total)
  else:
    print(lis[a-1])
Problem p02756 (python)

Fixed submission:
from collections import deque

S = input()
Q = int(input())

q = deque()
rev = 0

for s in S:
  q.append(s)

for _ in range(Q):
  TFC = input()
  if len(TFC) == 1: # T == 1
    rev ^= 1
  else:
    T, F, C = (i for i in TFC.split())  
    if (F == '2' and not rev) or (F == '1' and rev):
      q.append(C)
    else:
      q.appendleft(C)
      
ans = ''.join(q)

if rev:
  print(ans[::-1])
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
from collections import deque

S = input()
Q = int(input())

q = deque()
rev = 0

for s in S:
  q.append(s)

for _ in range(Q):
  TFC = input()
  if len(TFC) == 1: # T == 1
    rev ^= 1
  else:
    T, F, C = (i for i in TFC.split())  
    if F == '1' and rev:
      q.append(C)
    else:
      q.appendleft(C)
      
ans = ''.join(q)

if reverse:
  print(ans[::-1])
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
from collections import deque

S = input()
Q = int(input())

q = deque()
rev = 0

for s in S:
  q.append(S)
  
for _ in range(Q):
  TFC = input()
  if len(TFC) == 1: # T == 1
    rev ^= 1
  else:
    T, F, C = (i for i in TFC.split())  
    if F == '1' and rev:
      q.append(C)
    else:
      q.appendleft(C)
      
if rev:
  q.reverse()

print(''.join(q))
Problem p02780 (python)

Fixed submission:
from collections import deque, defaultdict

N, K = (int(i) for i in input().split())  
P = [int(i) for i in input().split()] 

dice = [0]
for i in range(1000):
  dice.append(1 + 0.5 * i)
  
lis = [0]
sum = 0
for p in P:
  sum += dice[p]
  lis.append(sum)
  
ans = 0
for i in range(N - K + 1):
  ans = max(ans, lis[K+i] - lis[i])
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
from collections import deque, defaultdict

N, K = (int(i) for i in input().split())  
P = [int(i) for i in input().split()] 

dice = [0]
for i in range(1000):
  dice.append(1 + 0.5 * i)

q = deque()
ans = 0
for p in P:
  q.append(dice[p])
  
  if len(q) < K:
    continue
  else:
    ans = max(ans, sum(q))
    q.popleft()

print(ans)
Problem p02787 (python)

Fixed submission:
import numpy as np
H, N = (int(i) for i in input().split())  

a = np.empty(N, dtype='int')
b = np.empty(N, dtype='int')
dp = np.array([float('inf')]*(H+1))
dp[0] = 0

for i in range(N):
  a[i], b[i] = map(int, input().split())
  
for i in range(1, H+1):
  i_from = i - a
  i_from[i_from<0] = 0
  dp[i] = np.min(dp[i_from] + b)
print(int(dp[H]))

Buggy submission (verdict: Runtime Error):
import numpy as np
H, N = (int(i) for i in input().split())  
AB = [[int(i) for i in input().split()] for i in range(N)] 

dp = [None] * (H+1)
dp[0] = 0

for i in range(1, H+1):
  for a, b in AB:
    if dp[i-a] != None:
      if dp[i] != None:
        dp[i] = min(dp[i], dp[i-a] + b)
      else:
        dp[i] = dp[i-a] + b
  
bef = dp[0]
for i, x in enumerate(dp[1:]):
  if x is None:
    dp[i+1] = bef
    if i == len(dp[1:]) - 1:
      dp[H] = None
  else:
    bef = x
    

ans = np.inf
for a, b in AB:
  ans = min(ans, dp[H-a+1] + b)
if dp[H]:
  ans = min(ans, dp[H])
print(ans)
Problem p02911 (python)

Fixed submission:
n, k, q = map(int, input().split())
scores = [0] * n
out = []

for i in range(q):
  x = int(input())
  scores[x-1] += 1
  
for x in scores:
  out = 'Yes' if q - x < k else 'No'
  print(out)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()] 
out = 0

out = a[0] + a[n - 2]
for i in range(n - 2):
	out += min(a[i], a[i+1])  
    
print(out)
Problem p02939 (python)

Fixed submission:
S = input()
N = len(S)

bef = ''
i = 0
count = 0
while i < N:
  s = S[i]
  while s == bef:
    i += 1
    if i >= N:
      print(count)
      exit()
    else:
      s += S[i]
  
  bef = s
  i += 1
  count += 1
  
print(count)

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

bef = ''
i = 0
count = 0
while i < N:
  s = S[i]
  while s == bef:
    i += 1
    s += S[i]
  
  bef = s
  i += 1
  count += 1
  
print(count)
Problem p02947 (python)

Fixed submission:
from collections import Counter

n = int(input())
ans = 0
ctr = Counter()

for i in range(n):
  s = ''.join(sorted(list(input())))
  if s in ctr:
    ans += ctr[s]
  ctr[s] += 1
  
print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter

n = int(input())
t = [input() for i in range(n)]
c_list = []
ans = 0

for i in range(n):
  c = Counter(input())
  ans += c_list.count(c)
  c_list.append(c)
  
print(ans)
Problem p02963 (python)

Fixed submission:
import math
S = int(input())
 
x1 = math.ceil(math.sqrt(S))
y1 = 1
x2 = x1 ** 2 - S
y2 = x1
x3 = 0
y3 = 0
 
print(x1, y1, x2, y2, x3, y3)

Buggy submission (verdict: Runtime Error):
import math
S = int(input())
 
x1 = math.ceil(math.sqrt(S))
y1 = 1
x2 = x1 * y2 - S
y2 = x1
x3 = 0
y3 = 0
 
print(x1, y1, x2, y2, x3, y3)

Buggy submission (verdict: Runtime Error):
from functools import reduce
from operator import mul
N = int(input())

for i in range(2, N):
  if N % i == 0:
    break

print(0, 0, 0, N//i, 0, i)

Buggy submission (verdict: Runtime Error):
from functools import reduce
from operator import mul
N = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
  
lis = sorted(prime_factorize(N))
print(0, 0, 0, lis[0], reduce(mul, lis[1:]), 0)
Problem p03048 (python)

Fixed submission:
r, g, b, n = (int(i) for i in input().split())  
 
rmax = int(n/r)
count = 0
 
for i in range(0, rmax + 1):
  gmax = (n - r * i) // g
  for j in range(0, gmax + 1):
    tmp = n - r * i - g * j
    if (tmp % b == 0 and tmp >=0):
      count += 1
  
print(count)

Buggy submission (verdict: Runtime Error):
r, g, b, n = (int(i) for i in input().split())  
 
rmax = int(n/r)
gmax = int(n/g)
count = 0
 
for i in range(0, rmax + 1):
  while j <= gmax and n - r * i - g * j <= 0:
    tmp = n - r * i - g * j
    if (tmp % b == 0 and tmp >=0):
      count += 1
    j += 1
  
print(count)
Problem p03147 (python)

Fixed submission:
import numpy as np

N = int(input())
h = np.array([int(i) for i in input().split()])
flag = [0] * N

thrs = 0

if N == 1:
  print(h[0])
  exit()

i = 0
ans = 0
l, r = (0, 0)
while sum(flag) != N:
  j = 0
  while j < l:
    if h[j] == 0:
      flag[j] = 1
    j += 1
  
  if h[l] == 0:
    l += 1
    flag[l] = 1
  
  i = 0
  i += l
  r = i
  while h[i] > thrs:
    r += 1
    i += 1
    if i == N:
      break
  
  if l == r:
    continue
  ans += min(h[l:r])
  h[l:r] = h[l:r] - min(h[l:r])
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np

N = int(input())
h = np.array([int(i) for i in input().split()])
flag = [0] * N

thrs = 0

i = 0
ans = 0
l, r = (0, 0)
while sum(flag) != N:
  j = 0
  while j < l:
    if h[j] == 0:
      flag[j] = 1
    j += 1
  
  if h[l] == 0:
    l += 1
    flag[l] = 1
  
  i = 0
  i += l
  r = i
  while h[i] > thrs:
    r += 1
    i += 1
    if i == N:
      break
  
  if l == r:
    continue
  ans += min(h[l:r])
  h[l:r] = h[l:r] - min(h[l:r])
print(ans)
Problem p03266 (python)

Fixed submission:
N, K = (int(i) for i in input().split())  
ans = 0
if K % 2 == 0:
  ans += (N//(K//2) - N//K) ** 3
  ans += (N//K) ** 3
else:
  ans += (N//K) ** 3

print(ans)

Buggy submission (verdict: Runtime Error):
N, K = (int(i) for i in input().split())  

def dfs(a, b, c):
  lis = [''.join([str(a), str(b), str(c)])]
  if max(a, b, c) > N:
    return []
  
  lis += dfs(a + K, b, c)
  lis += dfs(a, b + K, c)
  lis += dfs(a, b, c + K)
  return lis

ans = 0
l = []
if K % 2 == 0:
  l += dfs(K//2, K//2, K//2)
  l += dfs(K, K, K)
else:
  l += dfs(K, K, K)

print(len(set(l)))
Problem p03282 (python)

Fixed submission:
S = input()
K = int(input())
not_one = '1'
count = 0
for s in S:
  if s != '1':
    not_one = s
    break
  count += 1

if K <= count:
  print('1')
else:
  print(not_one)

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

if S[0] == '1':
  print(S[1])
else:
  print(S[0])
Problem p03290 (python)

Fixed submission:
D, G = (int(i) for i in input().split())  
PC = [[int(i) for i in input().split()] for i in range(D)] 

s = 0
Q = []
for i, (p, c) in enumerate(PC):
    s += p
    Q.append((i+1, p, c))
    
dp = [-10**18]*(s+1)
dp[0] = 0

for i, p, c in Q:
  for j in range(s, -1, -1): # 解きうる問題総数をイテレート
    for k in range(1, p+1): # 解く問題数をイテレート
      if k == p:
        cc = 100*i*k + c
      else:
        cc = 100*i*k
      if j - k >= 0:
        dp[j] = max(dp[j], dp[j - k] + cc)

for i, total in enumerate(dp):
  if total >= G:
    print(i)
    break

Buggy submission (verdict: Runtime Error):
D, G = (int(i) for i in input().split())  
PC = [[int(i) for i in input().split()] for i in range(D)] 

max_atmpt = G // (D * 100)
total = 0
ans = 0
count = 0
pc_gain_sorted = []
idx_list = []
for i, (p, c) in enumerate(PC):
  pc_gain_sorted.append((p * (i + 1) * 100 + c, i + 1, p))
pc_gain_sorted.reverse()

for gain, idx, _ in pc_gain_sorted:
  if total + gain <= G:
    total += gain
    idx_list.append(idx) # start from 1
    count += PC[idx - 1][0]
    
for gain, idx, p in pc_gain_sorted:
  if idx not in idx_list:
    break

for i in range(10):
  tmp = []
  for j, (p, c) in enumerate(PC):
    if i + 1 
  	tmp.append((j + 1) * 100 * (i + 1)
  

print(ans + count)
Problem p03292 (python)

Fixed submission:
l = [int(i) for i in input().split()] 
ans = 0

for j in range(len(l) - 1):
	for i in range(len(l) - 1):
		if l[i+1] < l[i]:
			tmp = l[i+1]
			l[i+1] = l[i]
			l[i] = tmp
        
for i in range(len(l) - 1):
	ans += l[i+1] - l[i]
    
print(ans)

Buggy submission (verdict: Runtime Error):
l = [int(i) for i in input().split()] 
l_sort = np.sort(l)
l_diff = np.diff(l_sort)
 
print(np.sum(l_diff))

Buggy submission (verdict: Runtime Error):
l = [int(i) for i in input().split()] 
ans = 0
 
for i in range(len(l) - 1):
	if l[i+1] < l[i]:
      tmp = l[i+1]
      l[i+1] = l[i]
      l[i] = tmp

for i in range(len(l) - 1):
	ans += l[i+1] - l[i]

print(ans)

Buggy submission (verdict: Runtime Error):
l = [int(i) for i in input().split()] 
ans = 0
 
for i in range(len(l) - 1):
	if l[i+1] < l[i]:
	tmp = l[i+1]
	l[i+1] = l[i]
	l[i] = tmp
    
for i in range(len(l) - 1):
	ans += l[i+1] - l[i]
    
print(ans)

Buggy submission (verdict: Runtime Error):
l = [int(i) for i in input().split()] 
ans = 0

for i in range(len(l) - 1):
	if l[i+1] < l[i]:
	tmp = l[i+1]
	l[i+1] = l[i]
	l[i] = tmp

for i in range(len(l) - 1):
	ans += l[i+1] - l[i]

print(ans)
Problem p02612 (python)

Fixed submission:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
def resolve():
    N,=pin()
    print ((-N)%1000)
#%%submit!
resolve()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
from copy import deepcopy
def resolve():
    H,W,K=pin()
    maze=[list(input()) for a in range(H)]
#    print(maze)

    #double bit full search
    ans=0
    for i in range(2**H):
        for j in range(2**W):
            #i,j is a set such that not colored red
            notred=[]
            numh=[0]*W
            #Height
            for ci in range(H):
                check=1<<ci
                if i & check:
                    #nukiidasi
                    for k in range(W):
                        if maze[ci][k]=="#":
                            numh[k]+=1

            cal=0
            for cj in range(W):
                check=1<<cj
                if j & check:
                    cal+=numh[cj]
            if cal==K:ans+=1
    print(ans)

#%%submit!
resolve()
Problem p02662 (python)

Fixed submission:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
def resolve():
    N,S=pin()
    A=tupin()#調子にのるな
    mod=998244353
    
    #形式的冪級数を考える
    #普通の部分和ッ->集合内の各アイテムについて、選ぶか選ばないか。O(2^n)の探索
    #これを形式的冪級数でいえば、（1+x^a）を掛ける計算になる　指数時間ではない
    #つまり、集合A,Sに対して、[x^s]PI(1+x^a_i) (f_i)

    #次に、Aの部分集合について考える
    #サンプル1の場合、N==3なので8個の部分集合がある
    #つまり、F3＝1+(f_1+f_2+f_3)+(f1_f2+f2_f3+f3_f1)+f1_f2_f3を考える
    #果たして、一般的なNにたいして多項式時間でにFnをもとめれば指数時間は完全回避できる
    #F3=(1+f1+f2+f1f2)+f3{(1+f1+f2+f1f2)}
    #  =(1+f3)(1+f1+f2+f1f2)
    #  =(f3で追加された新しいところ)(N=2のときのすべての部分集合)

    #これは、f3をSの部分集合にふくめるか、含めないかの探索と同等
    #一般的にFn=F_n-1*(1+fn)=PI(1+fn)とわかる

    #求めるものは[x^S]PI(1+fn)=[x^S]PI(2+x^a)

    from collections import defaultdict #本当は良くないがわかりやすさのためココに置く
    from copy import deepcopy
    
    ans=defaultdict(int)#i
    ans[0]=1 #init ,1=x^0より
    #print(ans)
    for a in A:
        #ans そのものと、ansの係数にx^aをかけたものを足し算    
        temp=defaultdict(int)
        for x in ans:
            if x+a<=S:
                temp[x+a]=ans[x]
            
            ans[x]*=2
            ans[x]%=mod
        for t in temp:
            if t<=S:
                ans[t]+=temp[t]
                ans[t]%=mod
    print(ans[S])    
    
#%%submit!
resolve()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
def resolve():
    N,S=pin()
    A=list(pin())

    #print(A)

    #dp[i]"s""n" i番めまで見る。n個使った。和がsになった2重の辞書…
    dp=[dict()for i  in range(N+1)]
    #sを辞書として管理するとうまく配るDPが実装できるよね
    dp[0].setdefault(0,dict())
    dp[0][0].setdefault(0,1)
    

    for i in range(N):#
        kouho=A[i]
        for s in dp[i]:
            ref=dp[i][s]
            for k,v in ref.items():
                ##print(k,v)
                #saiyousinai
                dp[i+1].setdefault(s,dict())
                dp[i+1][s].setdefault(k,0)
                dp[i+1][s][k]+=v
                #saiyou        
                x=s+kouho
                ##print(x)
                if x<=S:
                    dp[i+1].setdefault(x,dict())
                    dp[i+1][x].setdefault(k+1,0)
                    dp[i+1][x][k+1]+=v
                
    temp=(dp[-1][S])
    ans=0
    for p,q in temp.items():
        if N-p>=0:
            ans+=q*(2**(N-p))
    print(ans)
#%%submit!
resolve()
Problem p02706 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10000000)

#const
dxdy=((1,0),(0,1))
#my functions here!
def pin(type=int):
    return map(type,input().rstrip().split())
from math import gcd

#your code here!
def resolve():
    N,M=pin()
    A=(pin())
    t=(N)-sum(A)
    #print(t)
    ans=t if t>-1 else -1
    print(ans)

import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """41 2
5 6"""
        output = """30"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """10 2
5 6"""
        output = """-1"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """11 2
5 6"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_4(self):
        input = """314 15
9 26 5 35 8 9 79 3 23 8 46 2 6 43 3"""
        output = """9"""
        self.assertIO(input, output)


if __name__ == "__main__":
    #unittest.main()


    resolve()

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10000000)

#const
dxdy=((1,0),(0,1))
#my functions here!
def pin(type=int):
    return map(type,input().rstrip().split())
from math import gcd

#your code here!
def resolve():
    N,M=pin()
    A=(pin())
    t=(N)-sum(A)
    #print(t)
    ans=t if t>-1 else -1
    print(ans)

import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """41 2
5 6"""
        output = """30"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """10 2
5 6"""
        output = """-1"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """11 2
5 6"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_4(self):
        input = """314 15
9 26 5 35 8 9 79 3 23 8 46 2 6 43 3"""
        output = """9"""
        self.assertIO(input, output)


if __name__ == "__main__":
    #unittest.main()

"""
    I wrote my code above!
"""
    resolve()#and submit 2 atcoder!
Problem p02885 (python)

Fixed submission:
# coding: utf-8
# Your code here!
# coding: utf-8
import sys
sys.setrecursionlimit(10000000)

#const
# my functions here!
def pin(type=int):
    return map(type,input().rstrip().split())

def resolve():
    A,B=pin()
    ans=0 if (A<B*2) else A-B*2
    print(ans)
"""
#printデバッグ消した？
#前の問題の結果見てないのに次の問題に行くの？
"""
"""
お前カッコ閉じるの忘れてるだろ
"""
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """12 4"""
        output = """4"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """20 15"""
        output = """0"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """20 30"""
        output = """0"""
        self.assertIO(input, output)

if __name__=="__main__":resolve()

Buggy submission (verdict: Runtime Error):
A,B=map(int,input())
    ans=0 if A-B*2<0 else A-B*2
    print(A-B*2)
Problem p02899 (python)

Fixed submission:
#print#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code

#なお、任意の整数 M に対して M の −2 進数表現が一意に定まることが証明できます。
#2桁ごとに見るとよかった（もう実験したよ）
def resolve():
    N,=pin()
    A=list(pin())
    B=[(i+1,A[i]) for i in range(N)]
    B.sort(key=lambda x:x[1])
    ans=[]
    for b in B:
        ans.append(b[0])
    print(*ans)
resolve()

Buggy submission (verdict: Runtime Error):
#print#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code

#なお、任意の整数 M に対して M の −2 進数表現が一意に定まることが証明できます。
#2桁ごとに見るとよかった（もう実験したよ）
def resolve():
    N,=pin()
    A=list(pin())
    B=[(i+1,A[i]) for i in range(N)]
    B.sort(key=lambda x:x[1])
    ans=[]
    for b in B:
        ans.append(B[0])
    print(+a)
resolve()
Problem p02922 (python)

Fixed submission:
def pin(type=int):
    return map(type,input().rstrip().split())

def resolve():
    A,B=pin()
    ans=0
    plug=1
    while(1):
        if plug>=B:
            print(ans)
            break
        ans+=1
        plug=plug-1+A
        
resolve()

Buggy submission (verdict: Runtime Error):
def pin(type=int):
    return map(type,input().rstrip().split())
from math import gcd
def resolve():
    A,B=pin()
    ans=0
    plug=1
    while(1):
        ans+=1
        plug=plug-1+A
        if plug>=B:
            print(ans)
            break
resolve()

Buggy submission (verdict: Runtime Error):
def pin(type=int):
    return map(type,input().rstrip().split())
from math import gcd
def resolve():
    A,B=pin()
    ans=0
    plug=1
    while(1):
        ans+=1
        plug=plug-1+A
        if plug>=B:
            print(ans)
            break
Problem p03085 (python)

Fixed submission:
N=input()
a="ACGT"
j=0
for i in range(4):
  if a[i]==N:
  	j=i  
print(a[3-j])

Buggy submission (verdict: Runtime Error):
N=input()
a=ACGT
j=0
for i in range(4):
  if a[i]==N:
  	j=i  
print(a[3-j])
Problem p03125 (python)

Fixed submission:
a,b=map(int,input().split())
ans = a+b if (b%a==0) else b-a
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input())
ans = a+b if (b%a==0) else b-a
print(ans)
Problem p03130 (python)

Fixed submission:
def pin(type=int):
  return map(type,input().split())
counter = [0]*4
for i in range(3):
  a,b=pin()
  counter[a-1]+=1
  counter[b-1]+=1
ans=1
for j in counter:
  if j>2 or j<1:
    ans=0
print(["NO","YES"][ans])

Buggy submission (verdict: Runtime Error):
def pin(type=int):
  return map(type,input().split())
counter = [0]*4
for i in range(3):
  a,b=pin()
  counter[a]+=1
  counter[b]+=1
ans=1
for j in counter:
  if j>3 or j<1:
    ans=0
print(["NO","YES"][ans])
Problem p03210 (python)

Fixed submission:
x=input()
print(["NO","YES"][x in "357"])

Buggy submission (verdict: Runtime Error):
print(["NO","YES"][int(input())==7 or int(input())==5 or int(input())==3])
Problem p03220 (python)

Fixed submission:
#入力（後でいじる）
def pin(type=int):
    return map(type,input().split())
#どっかで最悪計算量の入力データを用意する関数を作ろう？
"""

"""
#solution:
#潜 影 蛇 手 ! !
N=int(input())
T,A=pin()
H=[i for i in pin()]
c=(T-A)/0.006
HH=[abs(h-c) for h in H]
#print(c,HH)
print(HH.index(min(HH))+1)

Buggy submission (verdict: Runtime Error):
#潜 影 蛇 手 ! !
N=int(input())
T,A=pin()
c=(T-A)/0.006
HH=[abs(h-c) for h in pin()]
#print(c,HH)
print(HH.index(min(HH))+1)
Problem p03241 (python)

Fixed submission:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
#%%code
def resolve():
    N,K=pin()
    t=K//N
    for i in range(t,0,-1):
        if K%i==0:
            print(i)
            return
        
#%%submit!
resolve()

Buggy submission (verdict: Runtime Error):
N,M=map(int,input())
t=M//N
#Mを因数分解する必要など無いか…？
#print(t)
for p in reversed(range(2,t+1)):
    if M%p==0:
        print(p)
        break