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

Fixed submission:
N=int(input())
S=input()
A=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
A=[i.upper() for i in A]
##print(A)
S=list(S)
for i, a in enumerate(S):
    S[i]=A.index(a)+N
    if S[i]>25:
        S[i]=S[i]-26
    S[i]=A[S[i]]

print("".join(S))

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
A=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','t','u','v','w','x','y','z']
A=[i.upper() for i in A]
print(A)
S=list(S)
for i, a in enumerate(S):
    S[i]=A.index(a)+N
    if S[i]>26:
        S[i]=S[i]-26
    S[i]=A[S[i]]

print("".join(S))

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
A=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','t','u','v','w','x','y','z']
A=[i.upper() for i in A]
print(A)
S=list(S)
for i, a in enumerate(S):
    S[i]=A.index(a)+N
    S[i]=A[S[i]]

print("".join(S))
Problem p02885 (python)

Fixed submission:
a, b = map(int, input().split())

w = 0

if a<2*b :
    w = 0
    print(w)

else:
    w = a-2*b
    print(w)

Buggy submission (verdict: Runtime Error):
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
print(l)
for i in range(n):
    for j in range(i+1,n):
        s = bisect.bisect_left(l,l[i]+l[j])-j-1
        a+=s


print(a)
Problem p02888 (python)

Fixed submission:
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
#print(l)
for i in range(n-2):
    for j in range(i+1,n-1):
        s = bisect.bisect_left(l,l[i]+l[j])-j-1
        a+=s


print(a)

Buggy submission (verdict: Runtime Error):
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
 
for i in range(n-2):
    for j in range(i+1,n-1):
        s = bisect.bisect_left(l[i]+l[j])
        a =a + n - s+1


print(a)

Buggy submission (verdict: Runtime Error):
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
 
for i in range(n-2):
    for j in range(i+1,n-1):
        s = bisect.bisect_left(l[i]+l[j])
        a += n-s-1 


print(a)

Buggy submission (verdict: Runtime Error):
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
 
for i in range(len(l)-2):
    for j in range(i+1,len(l)-1):
        s = bisect.bisect_left(l[i]+l[j])
        a += n-s-1 


print(a)

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

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

a = 0

for i in range(len(l)):
    for j in range(i+1,len(l)):
        if j > l[i]+l[j]]:
            a+=1
        

print(a)

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

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

a = 0

for i in range(len(l)):
    for j in range(i+1,len(l)):
        a = a + int(len([for k in l if i > l[i]+l[j]]))
        

print(a)

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

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

a = 0

for i in range(len(l)):
    for j in range(i+1,len(l)):
        a = a + int(len(for k in l if i > l[i]+l[j]))
        

print(a)
Problem p02898 (python)

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

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

ans = 0
for i in h:
    if i>=K:
        ans+=1


print(ans)

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

h = list(map(int(input().split())))

ans = 0
for i in h:
    if i>=K:
        ans+=1

print(ans)

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

h = list(map(int(input().split())))

ans = 0
for i in h:
    if i>=K:
        ans+=1

print(ans)

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

h = list(map(int(input().split())))

ans = 0
[ans+= for i in h if i>=50]

print(ans)
Problem p02899 (python)

Fixed submission:
N = int(input())

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

ans = [0]*N
for i,j in enumerate(A):
    ans[j-1]=i+1
print(*ans)

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

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

ans = [0]*N
[ans[j-1]=i+1 for i,j in enumerate(A)]
print(*ans)

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

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

ans = [0]*N
[ans[i-1]=i+1 for i, j in range(N)]
print(*ans)

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

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

ans = []
[ans.append(j+1) for i, j in enumarate(A)]
print(*ans)

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

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

ans = []
[ans.extend(A.index(i)+1) for i in range(1,N+1)]
print(*ans)

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

A = list(map(int, input().split()))
ans=[]
for i in range(1,N):
    ans.append(A.index(i))

print(' '.join(map(str,ans))
Problem p02910 (python)

Fixed submission:
# -*- coding: utf-8 -*-
s = input()

for i in range(0,len(s)):
  if (i%2==0)and(s[i]=="L"):
    print("No")
    exit()
  elif (i%2==1)and(s[i]=="R"):
    print("No")
    exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s = input()

for i in range(0,len(s)):
  if (i%2==1)and(s[i]=="L"):
    print("No")
    exit()
  elif (i%2==0)s[i]=="R":
    print("No")
    exit()
print("Yes")
Problem p02772 (python)

Fixed submission:
input()
inputs = map(int, input().split(" "))

is_denied = False
for i in inputs:
  if i % 2 ==0 and ( i % 3 != 0 and i % 5 != 0):
      is_denied = True
      
if is_denied:
  print("DENIED")
else:
  print("APPROVED")

Buggy submission (verdict: Runtime Error):
inputs = map(int, input().split(" "))

is_denied = False
for i in inputs:
  if i % 2 ==0:
    if i % 3 != 3 or i % 5 != 5
    	is_denied = True
      
if is_denied:
  print("DENIED")
else:
  print("APPROVED")

Buggy submission (verdict: Runtime Error):
inputs = map(int, input.split(" "))

is_denied = False

for i in inputs:
  if i % 2 ==0:
    if i % 3 != 0 or i % 5 == 0:
      is_denied = True
      

if is_denied:
  print("DENIED")
else:
  print("APPROVED")
Problem p03323 (python)

Fixed submission:
a,b = map(int,input().split())

if a <= 8 and b <= 8:
  print('Yay!')
else:
  print(':(')

Buggy submission (verdict: Runtime Error):
a,b = int(input().split())

if a <= 8 and b <= 8:
  print('Yay!')
else:
  print(':(')
Problem p02817 (python)

Fixed submission:
S, T = input().split()
print(T+S)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

print(S+T)
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy submission (verdict: Runtime Error):
a,b = map(int, input())

if a*b % 2 == 0:
  print('Even')
else:
  print('Odd')
Problem p03210 (python)

Fixed submission:
x=int(input())
if x==3 or x==5 or x==7:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
x=int(input())
if x==3||x==5||x==7:
  print("YES")
else:
  print("NO")
Problem p03470 (python)

Fixed submission:
N = int(input())
d = [input() for i in range(N)]
print(len(set(d)))

Buggy submission (verdict: Runtime Error):
N=int(input())
l = [int(input()) for i in range(1,n+1)]
print(len(set(l)))
Problem p03471 (python)

Fixed submission:
N, Y = map(int, input().split())
res = (-1, -1, -1)
for x in range(N + 1):
    for y in range(N + 1 - x):
        if N - x - y >= 0 and 10000*x + 5000*y + 1000*(N - x - y) == Y:
            res = (x, y, N - x - y)
print(res[0], res[1], res[2])

Buggy submission (verdict: Runtime Error):
N,Y=map(int,input().split())
res=(-1,-1,-1)
for x in range(N+1):
    for y in range(N+1-x);
    if N-x-y>=0 and 10000*x+5000*y+1000*(N-x-y)==Y:
        res=(x,y,N-x-y)
print(res[0],res[1],res[2])
Problem p03493 (python)

Fixed submission:
print(input().count("1"))

Buggy submission (verdict: Runtime Error):
print(input.count("1"))
Problem p02783 (python)

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

ans = -(-H // A)

print(ans)

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

ans = -(-H // A)

print(ans)
Problem p02802 (python)

Fixed submission:
N, M = map(int, input().split())
results = [input().split() for _ in range(M)]
solved = set()
missed = dict()
penalty = 0

for p, S in results:
    if p in solved:
        continue

    if S == 'AC':
        solved.add(p)
        penalty += missed[p] if p in missed else 0
    else:
        missed[p] = missed[p] + 1 if p in missed else 1

print(len(solved), penalty)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
results = [input().split() for _ in range(M)]
solved = set()
missed = dict()
penalty = 0

for p, S in results:
    if p in solved:
        continue

    if S == 'AC':
        solved.add(p)
        penalty += missed[p]
    elif p not in missed:
        missed[p] = 1
    else:
        missed[p] += 1

print(len(solved), penalty)
Problem p02803 (python)

Fixed submission:
from collections import deque
from itertools import chain

H, W = map(int, input().split())
maze = [list(input()) for _ in range(H)]
directions = [(1, 0), (0, 1), (-1, 0), (0, -1)]
max_d = 400


def bfs(start):
    queue = deque()
    queue.append(start)

    distance = [[max_d] * W for _ in range(H)]
    sx, sy = start
    distance[sx][sy] = 0

    while len(queue) > 0:
        x, y = queue.popleft()
        for dx, dy in directions:
            nx = x + dx
            ny = y + dy
            if nx >= 0 and nx < H and ny >= 0 and ny < W and maze[nx][ny] == '.' and distance[nx][ny] == max_d:
                queue.append((nx, ny))
                distance[nx][ny] = distance[x][y] + 1

    return max(filter(lambda d: d != max_d, chain.from_iterable(distance)))


ans = 0
for i in range(H):
    for j in range(W):
        if maze[i][j] == '.':
            ans = max(ans, bfs((i, j)))

print(ans)

Buggy submission (verdict: Runtime Error):
from collections import deque
from itertools import chain
from math import inf

H, W = map(int, input().split())
maze = [list(input()) for _ in range(H)]
directions = [(1, 0), (0, 1), (-1, 0), (0, -1)]


def bfs(start):
    queue = deque()
    queue.append(start)

    distance = [[inf] * W for _ in range(H)]
    sx, sy = start
    distance[sx][sy] = 0

    while len(queue) > 0:
        x, y = queue.popleft()
        for dx, dy in directions:
            nx = x + dx
            ny = y + dy
            if nx >= 0 and nx < H and ny >= 0 and ny < W and maze[nx][ny] == '.' and distance[nx][ny] == inf:
                queue.append((nx, ny))
                distance[nx][ny] = distance[x][y] + 1

    return max(filter(lambda d: d != inf, chain.from_iterable(distance)))


ans = 0
for i in range(H):
    for j in range(W):
        if maze[i][j] == '.':
            ans = max(ans, bfs((i, j)))

print(ans)
Problem p03730 (python)

Fixed submission:
import fractions

A, B, C = map(int, input().split())
gcd = fractions.gcd(A, B)

if gcd == 1 and C != 0 or gcd != 1 and fractions.gcd(gcd, C) != 1:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
import math

A, B, C = map(int, input().split())
gcd = math.gcd(A, B)

if gcd == 1 and C != 0 or gcd != 1 and math.gcd(gcd, C) != 1:
    print('YES')
else:
    print('NO')
Problem p02899 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
s = [0] * n
for i in range(n):
    s[a[i]-1] += i+1 
print(*s)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split())
s = [0] * n
for i,j in enumerate(a):
    s[j-1] = i+1
print(*s)
Problem p03285 (python)

Fixed submission:
n = int(input())
lista = [4*i for i in range((100//4)+1)]
listb = [7*i for i in range((100//7)+1)]
flag = False
for i in lista:
    for j in listb:
        if i+j == n:
            flag = True
if flag:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
lista = [4:101:4]
listb = [7:101:7]
flag = False
for i in lista:
    for j in listb:
        if i+j == n:
            flag = True
            break
if flag:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
lista = [4:101:4]
listb = [7:101:7]
flag = False
for i in lista:
    for j in listb:
        if i+j == n:
            flag = True
            break
if flag:
    print('Yes')
else:
    print('No')
Problem p03292 (python)

Fixed submission:
a = list(map(int, input().split()))
s = sorted(a, reverse=True)
ans = [s[i]-s[i+1] for i in range(2)]
print(sum(ans))

Buggy submission (verdict: Runtime Error):
a = list(map(int, input().split()))
s = sorted(a).reverse
ans = [s[i+1]-s[i] for i in range(2)]
print(sum(ans))
Problem p03293 (python)

Fixed submission:
s = input()
t = input()
ss = s+s
f=0
for i in range(len(s)):
    if ss[i:len(s)+i] == t:
        f = 1
if f:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
ss = s+s+s
f=0
for i in range(len(s)):
    if ss[i:len(s)+i] == t:
    f = 1
if f:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
ss = s+s
f=0
for i in range(len(s)):
    if ss[i:len(s)+i] == t:
    f = 1
if f:
    print("Yes")
else:
    print("No")
Problem p02772 (python)

Fixed submission:

num = input()
a = input().split()
flag = 0
for item in a:
    item=int(item)
    if item%2==0:
        if item%3==0 or item%5==0:
            pass
        else:
            flag=1

if flag==0:
    print("APPROVED")
else:
    print("DENIED")

Buggy submission (verdict: Runtime Error):

num = input()
a = input().split()
flag = 0
for item in a:
    if item%2==0:
        if item%3==0 or item%5==0:
            pass
        else:
            flag=1

if flag==0:
    print("APPROVED")
else:
    print("DENIED")
Problem p02772 (python)

Fixed submission:
n = int(input())

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

flag = True

for i in range(n):
  if a[i]%2 == 0:
    if a[i]%3 != 0 and a[i]%5 != 0:
      print('DENIED')
      flag = False
      break
      
if flag:
  print('APPROVED')

Buggy submission (verdict: Runtime Error):
n = int(input().split())

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

flag == True

for i in range(n):
  if a[i]%2 == 0:
    if a[i]%3 != 0 or a[i]%5 != 0:
      print('DENIED')
      flag = False
      break
      
if flag:
  print('APPROVED')
Problem p02780 (python)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

m = [(e + 1) / 2 for e in p]

t = sum(m[0:K])
result = t
for i in range(N - K):
    t -= m[i]
    t += m[i + K]
    if t > result:
        result = t
print(result)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
 
p = list(map(int, input().split()))
 
p = [(e+1) / 2 for e in p]
 
s_max = sum(p[0:k])
 
for i in range(n-k):
  s = s - p[i] + p[i+k]
  if s_max < s:
    s_max = s
    
print(s_max)

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

p = [(e+1) / 2 for e in p]

s_max = sum(p[0:k])

for i in range(n-k+1):
  s = s - p[i] + p[i+k]
  if s_max < s:
    s_max = s
    
print(s_max)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
 
p = list(map(int, input().split()))
s_max = 0

p = [(e+1) / 2 for e in p]

for i in range(n-k+1):
  s = sum(p[i:i+k])
  if s_max < s:
    s_max = s
    
print(e)
Problem p02783 (python)

Fixed submission:
h, a = map(int, input().split())
count = 0

while h > 0:
  count += 1
  h = h - a
 
print(count)

Buggy submission (verdict: Runtime Error):
h, a = map(int, input(),split())
count = 0

while h > 0:
  count += 1
  h = h - a
 
print(count)
Problem p02784 (python)

Fixed submission:
h, n = map(int, input().split())
a = list(map(int, input().split()))
 
a = sorted(a)
 
for i in a:
  h = h - i
 
if h <= 0:
  print('Yes')
else:
  print('No')

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

a = sorted(a)

for i in a:
  h = h - a
 
if h <= 0:
  print('Yes')
else:
  print('No')

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

a = sorted(a)

for i in a:
  h = h - a
 
if h <= 0:
  print('Yes')
else:
  print('No)
Problem p02786 (python)

Fixed submission:
h = int(input())
 

def cal(h):
  if h == 1:
    return 1
  
  return 2*cal(int(h/2)) + 1
 
print(cal(h))

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

count = 0

def cal(h):
  if h = 1:
    count = count + 1
    return 0
  
  return count + cal(int(h/2))) + 1

print(cal(h))
Problem p03267 (python)

Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# 終了後に解説を見て解けた
# パス数が２のべき乗であれば簡単にグラフを構築できることに気付きたかった。
#
# 本番中は、10進法で考えて 頂点1と頂点2の間を辺{0, 100, 200, ..., 900}で繋ぎ、頂点2と頂点3の間を辺{0, 10, ..., 90}で繋ぎ、
# などという事を考えていたが、それ以上進展させることが難しかった。


import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

L = int(input())

v = 1
edges = []  # (from, to, cost)

# L = 37の場合を例にとりコメントを付与
# まず長さ0 ~ 31までのパスを作成する。
#   頂点1 -> 頂点2を0の辺と1の辺で結ぶ
#   頂点2 -> 頂点3を0の辺と2の辺で結ぶ
#   頂点3 -> 頂点4を0の辺と4の辺で結ぶ
#   頂点4 -> 頂点5を0の辺と8の辺で結ぶ
#   頂点5 -> 頂点6を0の辺と16の辺で結ぶ
n = 2
cost = 1
while n <= L:
    edges.append((v, v+1, 0))
    edges.append((v, v+1, cost))
    cost *= 2
    v += 1
    n *= 2

# 頂点6をv_sink(最終到達点)とする
v_sink = v

# ここから先、長さ32, 33, 34, 35, 36のパスを生成することになる。
# 頂点3と頂点6を、32の辺で直でつなぐと、長さ32, 33, 34, 35のパスが作れる。
# 頂点1と頂点6を、36の辺で直でつなぐと、長さ36のパスが作れる。
n //= 2
N = n
L -= N

while L > 0:
    if L >= n:
        edges.append((v, v_sink, N))
        L -= n
        N += n
    n //= 2
    v -= 1

print(v_sink, len(edges))
for e in edges:
    print(*e)

Buggy submission (verdict: Runtime Error):
L = int(input())
# ノード数を決める
for i in range(1,21):
    if (1 << i) > L:
        node = i
        break

# 必ず 0と2^Nの辺を貼る
edge = []
for i in range(node-1):
    edge.append((i+1,i+2,0))
    edge.append((i+1,i+2,1<<i))

# 2の累乗の区間に分割
for i in range(node-1):
    if (L >> i) & 1:
        edge.append((i+1,node,L-(1<<i)))
        L = L-(1<<i)

#出力
print(str(dig) + " " + str(len(edge)))
s = "{0} {1} {2}"
for v,v2,w in edge:
    print(s.format(v,v2,w))
Problem p03282 (python)

Fixed submission:
s = list(input())
k = int(input())
 
flag = True

for i in range(k):
  if s[i] != "1":
    print(s[i])
    flag = False
    break

if flag:
  print("1")

Buggy submission (verdict: Runtime Error):
s = input()
k = input()

flag = True

for i in range(len(k)):
  if s[i] != 1:
    prtin(s[i])
    flag = false
    break
    
if flag:
  print("1")
Problem p03284 (python)

Fixed submission:
n , k = map(int, input().split())

if n % k == 0:
    print("0")
else:
    print("1")

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

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

S = {0 : 1}
t = 0
for i in range(N):
  t = (t + D[i]) % M
  if t in S:
    S[t] += 1
  else:
    S[t] = 1

r = 0

for i in S.values():
  r += i * (i - 1) // 2
  
print(r)

Buggy submission (verdict: Runtime Error):
n , k = map(int, input().split())

if n % k == 0:
    print("0"):
else:
    print("1")
Problem p03285 (python)

Fixed submission:
n = int(input())

c = 0

ans = 'No'

for i in range(15):
    for j in range(26):
        c = 4 * j + 7 * i
        if n == c:
            ans = 'Yes'
            break
print(ans)

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

c = 0

ans = 'No'
for i in range(15):
    for i in range(26):
        c = 4 * j + 7 * i
    if n == c:
        ans = 'Yes'

print(ans)
Problem p03292 (python)

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

a.sort()

print(a[2]- a[0])

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
s = []
m = 1

def f(m, a):
    s_tmp = 0
    for i in range(n):
        s_tmp = s_tmp + m % a[i]
    return s_tmp

for i in range(n):
    m = m * a[i]

print(f(m-1, a))
Problem p03309 (python)

Fixed submission:
n = int(input())

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

sorted_num = sorted([a[i] - i for i in range(len(a))])

b = sorted_num[len(sorted_num)//2]
print(sum([abs(b-i) for i in sorted_num]))

Buggy submission (verdict: Runtime Error):
s = 10000000

for i in range(2+max(a)):
  s_tmp = 0
  
  for j in range(n):
    s_tmp = s_tmp + abs(a[l] - i - (j+1))
    
    if s_tmp < s:
      s = s_tmp

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

a = list(map(int, input().split()))
s = 10000000

for i in range(2+max(a)):
  s_tmp = 0
  
  for j in range(n):
    s_tmp = s_tmp + abs(a[l] - i - (j+1))
    
    if s_tmp < s:
      s = s_tmp

print(s)
Problem p03324 (python)

Fixed submission:
d, n = map(int, input().split())

c = pow(100, d)

if n  != 100:
    a = c * n
else:
    a = c * (n+1)

print(a)

Buggy submission (verdict: Runtime Error):
d, n = map(int, input().split())

c = 100　** d

a = c * n

print(a)
Problem p03239 (python)

Fixed submission:
N, T = map(int, input().split())
array = [list(map(int, input().split())) for i in range(N)]

cost = 0
time = 0

for i in range(N):
    if array[i][1] <= T and (cost > array[i][0] or cost == 0):
        cost = array[i][0]

if cost == 0:
    print('TLE')
    exit()

print(cost)

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

array = [list(map(int, input().split())) for i in range(N)]

cost = 0

for i in range(N):
    if array[i][1] <= T and (cost == 0 or cost < array[i][0]:
    　   cost = arrayp[i][0]
if cost == 0:
    print('TLE')
print(cost)
Problem p03260 (python)

Fixed submission:

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

AB = A * B

for C in range(1, 4):
    if (AB * C) % 2 == 1:
        print('Yes')
        exit()

print('No')

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

word = []
for i in range(N):
    word.append(input())

for i in range(N - 1):
    if word.count(word[i]) != 1:
        print('No')
        exit()

for i in range(1, N):
    if word[i][0] != word[i - 1][-1]:
        print('No')
        exit()

print('Yes')

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

word = []

for i in range(N):
    word.append(input())

for i in range(N - 1):
    if word.count(word[i]) != 1:
        print('No')
        exit()


for i in range(1, N ):
    if word[i][0] != word[i - 1][-1]:
        print('No')
        exit()

print('Yes')
Problem p03261 (python)

Fixed submission:
N = int(input())

word = []
for i in range(N):
    word.append(input())

for i in range(N - 1):
    if word.count(word[i]) != 1:
        print('No')
        exit()

for i in range(1, N):
    if word[i][0] != word[i - 1][-1]:
        print('No')
        exit()

print('Yes')

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

word = [word.append(input()) for i in range(N)]


for i in range(1, N):
    if word[i][0] != word[i - 1][-1] or word.count(word[i]) != 1:
        print('No')
        exit()

print('Yes')
Problem p02784 (python)

Fixed submission:
H,A=map(int,input().split())
pattern = list(map(int,input().split()))  
a = sum(pattern)
if a < H:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
H,A=map(int,input().split())
pattern = [i for i in list(map(int,input().split()))  ]
a = max(pattern)
pattern.remove(a)
b= max(pattern)
if a+b < H:
    print("No")
else:
    print("Yes")
Problem p02789 (python)

Fixed submission:
N,M =map(int,input().split())
if N > M:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
N=int(input())
permu = list(map(int,input().split()))
cnt=0
for index,num in enumerate(permu):
    if num <= min(permu[:index+1]):
        cnt+=1
    
    else:
        continue
print(cnt)