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

Fixed submission:
import numpy as np

N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort()

L = []
for i in range(M):
    B, C = map(int, input().split())
    L.append([B,C])
L = np.array(L)
L = L[np.argsort(L[:,1])[::-1]]

i = 0
for b,c in L:
    for j in range(b):
        if i+1 <= len(A):
            if A[i] < c:
                A[i] = c
                i += 1
            else:
                print(sum(A))
                quit()
        else:
            print(sum(A))
            quit()

print(sum(A))

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

N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort()

L = []
for i in range(M):
    B, C = map(int, input().split())
    L.append([B,C])
L = np.array(L)
L = L[np.argsort(L[:,1])[::-1]]


i = 0
for b,c in L:
    for j in range(b):
        if A[i] < c:
            A[i] = c
            i += 1
        else:
            print(sum(A))
            quit()
print(sum(A))
Problem p02859 (python)

Fixed submission:
r = int(input())
print(r**2)

Buggy submission (verdict: Runtime Error):
r
print(int(r)**2)
Problem p02689 (python)

Fixed submission:
N,M = (int(x) for x in input().split())
hight = [int(x) for x in input().split()]
tenbou = [input().split() for l in range(M)]
result = [1] * N


for i in range(M):
    x = int(tenbou[i][0]) - 1
    y = int(tenbou[i][1]) - 1
    if hight[x] > hight[y]:
        result[y] = 0
    elif hight[y] == hight[x]:
        result[x] = 0
        result[y] = 0
    elif hight[y] > hight[x]:
        result[x] = 0
#print(result)
print(result.count(1))

Buggy submission (verdict: Runtime Error):
N,M = (int(x) for x in input().split())
list = [int(x) for x in input().split()]
tenbou = [input().split() for l in range(M)]
jj = [1] * N

#print(list)
#print(tenbou)

for i in range(N-1):
    x = int(tenbou[i][0]) - 1
    y = int(tenbou[i][1]) - 1
    if list[x] >= list[y]:
        jj[y] = 0
    elif list[y] > list[x]:
        jj[x] = 0


        
#print(jj)
print(jj.count(1))
Problem p02723 (python)

Fixed submission:
S = list(input())

if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

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

if s[2] == s[3] and s[4] == s:
    print("Yes")
else:
    print("No")
Problem p02831 (python)

Fixed submission:
import fractions

a , b = (int(x) for x in input().split())

result = fractions.gcd(a, b)

print((a * b) // result)

Buggy submission (verdict: Runtime Error):
import math

a , b = (int(x) for x in input().split())

result = math.gcd(a, b)

print((a * b) // result)

Buggy submission (verdict: Runtime Error):
import math

a , b = (int(x) for x in input().split())

print((a * b) // math.gcd(a, b))

Buggy submission (verdict: Runtime Error):
import math

a , b = (int(x) for x in input().split())

print((a * b) // math.gcd(a, b))
Problem p02835 (python)

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

if a+b+c <= 21:
    print("win")
else:
    print("bust")

Buggy submission (verdict: Runtime Error):
X=int(input())
Y=int(input())
Z=int(input())

if(X+Y+Z>=22):
    print("bust")
else:
    print("win")

Buggy submission (verdict: Runtime Error):
X=int(input())
Y=int(input())
Z=int(input())

if(X+Y+Z>=22):
    print("bust")
else:
    print("win")
Problem p03835 (python)

Fixed submission:
K,S = (int(x) for x in input().split())
count = 0

for x in range(K+1):
    if x > S:
        break
    for y in range(K+1):
        z = S - x - y
        if 0 <= z <= K:
            count += 1
        elif x + y > S:
            break


print(count)

Buggy submission (verdict: Runtime Error):
K,S = (int(x) for x in input().split())
count = 0

for x in range(K+1):
    if x > S:
        break
    for y in range(K+1):
        z = s - x - y
        if 0 <= z <= K:
            count += 1
        elif x + y > S:
            break


print(count)
Problem p03041 (python)

Fixed submission:
n, k = [int(i) for i in input().split()]
s = input()
if k == 1:
    print(s[0].lower() + s[1:])
else:
    print(s[0:k-1] + s[k-1].lower() + s[k:])

Buggy submission (verdict: Runtime Error):
a = input().split()
n, k, s = a
k = int(k)
print(s.replace(s[k-1], s[k-1].lower()))
Problem p03075 (python)

Fixed submission:
a, b, c, d, e, k = [int(input()) for i in range(6)]
if e-a > k:
    print(':(')
else:
    print('Yay!')

Buggy submission (verdict: Runtime Error):
x = []
for i in input().split():
    x.append(int(i))

if x[4]-x[0] > x[5]:
    print(':(')
else:
    print('Yay!')

Buggy submission (verdict: Runtime Error):
a, b, c, d, e, k = [int(i) for i in input().split()]
if e-a > k:
    print(':(')
else:
    print('Yay')

Buggy submission (verdict: Runtime Error):
n = input().rsplit()
points = [int(i) for i in n]
dist = points[-2] - points[0]
if dist > points[-1]:
    print(':(')
else:
    print('Yay!')

Buggy submission (verdict: Runtime Error):
n = input().rsplit()
points = [int(i) for i in n]
distances = []
for i in range(len(points)-2):
   dist = points[-2] - points[i]
   distances.append(dist)

if max(distances) > points[-1]:
    print(':(')
else:
    print('Yay!')
Problem p03207 (python)

Fixed submission:
x = int(input())
p = [int(input()) for i in range(x)]
pay = sum(p) - max(p)//2
print(pay)

Buggy submission (verdict: Runtime Error):
x = [int(i) for i in input().split()]
pay = sum(x[1:]) - max(x[1:])//2
print(pay)

Buggy submission (verdict: Runtime Error):
x = [int(i) for i in input().split()]
x.pop(0)
pay = int(sum(x) - max(x)/2)
print(pay)

Buggy submission (verdict: Runtime Error):
x = [int(i) for i in input().split()]
x.pop(0)
pay = sum(x) - max(x)/2
print(int(pay))
Problem p03208 (python)

Fixed submission:
import numpy as np
n, k = map(int, input().split())
h = np.array(sorted([int(input()) for _ in range(n)]))
h_roll = np.roll(h, -k + 1)
x = h_roll - h
print(int(x[:-k + 1].min()))

Buggy submission (verdict: Runtime Error):
import numpy as np
n, k = map(int, input().split())
h = [int(input()) for _ in range(n)]
h = np.array(sorted(h))
diff = np.diff(h)
diff = np.tile(diff, (n - k + 1, 1))
mask_x = [[i] * (k - 1) for i in range(n - k + 1)]
mask_y = [range(i, i + k - 1) for i in range(n - k + 1)]
cost = np.sum(diff[mask_x, mask_y], axis=1)
print(cost.min())
Problem p03775 (python)

Fixed submission:
n = int(input())
f = float('inf')
for a in range(1, int(n**0.5)+1):
    if n % a == 0:
        b = n // a
        x = max(len(str(a)), len(str(b)))
        if f > x:
            f = x
print(x)

Buggy submission (verdict: Runtime Error):
n = int(input())
f = float('inf')
for a in range(1, int(n**0.5)):
    if n % a == 0:
        b = n // a
        x = max(len(str(a)), len(str(b)))
        if f > x:
            f = x
print(x)
Problem p03804 (python)

Fixed submission:
n, m = map(int, input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
flag = 0
for i in range(n-m+1):
    for j in range(n-m+1):
        c = [x[j:j+m] for x in a[i:i+m]]
        if c == b:
            flag = 1
            break
print('Yes') if flag == 1 else print('No')

Buggy submission (verdict: Runtime Error):
import sys
n, m = map(int, input().split())
A = [input() for _ in range(n)]
B = [input() for _ in range(m)]
count = 0
idx = 0
position = []
for b in B:
    if idx == 0:
        for i, a in enumerate(A[:-m]):
            if b in a:
                position.append(a.find(b))
                if a.count(b) > 1:
                    position.append(a.rfind())
                    position.append(a.find(b, a.find(b)))
                count += 1
                idx = i
                break
        if count == 0:
            print('No')
            sys.exit()
    else:
        for i, a in enumerate(A[idx+1:]):
            for p in position:
                if b == a[p:p + m]:
                    break
                print('No')
                sys.exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
import sys
n, m = map(int, input().split())
A = [input() for _ in range(n)]
B = [input() for _ in range(m)]
count = 0
idx = 0
position = []
for b in B:
    if idx == 0:
        for i, a in enumerate(A[:-m]):
            if b in a:
                position.append(a.find(b))
                if a.count(b) > 1:
                    position.append(a.rfind())
                count += 1
                idx = i
                break
        if count == 0:
            print('No')
            sys.exit()
    else:
        for i, a in enumerate(A[idx+1:-m]):
            for p in position:
                if b == a[p:p + m]:
                    break
                print('No')
                sys.exit()
print('Yes')
Problem p02577 (python)

Fixed submission:
N = int(input())
if N % 9 == 0:
    print("Yes")
else :
    print("No")

Buggy submission (verdict: Runtime Error):
N = input()
if N % 9 == 0:
    print("Yes")
else :
    print("No")
Problem p02578 (python)

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

for i in range(N-1):
  if(A[i] - A[i+1] > 0):
    Sum += A[i] - A[i+1]
    A[i+1] += A[i] - A[i+1]
 
print(Sum)

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

for i in range(N-1):
  if(A[i] - A[i+1] > 0):
    Sum += A[i] - A[i+1]
    A[i+1] += A[i] - A[i+1]
 
print(Sum)

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

for i in range(N-1):
  if(A[N] - A[N+1] > 0):    
    Sum += A[N] - A[N+1]
    A[N+1] += A[N] - A[N+1]
    
print(Sum)

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

for i in range(N-1):
  if(A[N+1] - A[N] > 0):
    Sum += A[N+1] - A[N]
    
print(Sum)

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

for i in range(N-1):
  Sum += A[i+1] - A[i]
 
print(Sum)
Problem p02627 (python)

Fixed submission:
import re

t = input()

pattern = r'[a-z]'

repattern = re.compile(pattern)

result = repattern.match(t)

if result:
    print('a')
else:
    print('A')

Buggy submission (verdict: Runtime Error):
N = int(input())
M = 'abcdefghijklmnopqrstuvwxyz'
L = []
res = ''

while(N>=26):
    N -= 1
    m = N % 26
    N = N // 26
    L = [m] + L

L = [N-1] + L

for m in L:
    res += M[m]
print(res)
Problem p02693 (python)

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

flag = False
for i in range(A,B+1):
    if i % K == 0:
        flag = True
        break

if flag:
    print('OK')
else:
    print('NG')

Buggy submission (verdict: Runtime Error):
4
5 7
Problem p02753 (python)

Fixed submission:
S = input()

if (S[0] == S[1]) and (S[1] == S[2]):
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
s = input()
q = int(input())
query = []
lead = ''
end = ''
inversion_flg = False
 
for j in range(q):
    i = input().split()
    if i[0] == "1":
        if inversion_flg:
            inversion_flg = False 
        else:
            inversion_flg = True
    else:
        if inversion_flg:
            if i[1] == "1":
                i[1] = "2"
            else:
                i[1] = "1"
        if i[1] == "1":
            lead+=i[2]
        else:
            end+=i[2]
 
lead = lead[::-1]
s = lead+s+end
if inversion_flg:
    s = s[::-1]
print(s)
Problem p02831 (python)

Fixed submission:
# import math
import fractions # Python 3.4ではこちらにgcdがある

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

def lcm(A,B):
    return A * B // fractions.gcd(A,B)

print(lcm(A,B))

Buggy submission (verdict: Runtime Error):
# import numpy as np
# A,B = map(int,input().split())
# print(np.lcm(A,B))
# numpyのlcm関数は新しく追加された関数であり、AtCoderでは使用不可
import math

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

def lcm(A,B):
    return A * B // math.gcd(A,B)

print(lcm(A,B))

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

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

print(np.lcm(A,B))
Problem p02984 (python)

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

X = []
temp = 0

for i in range(1,N,2):
    temp += C[i]
X.append( sum(C) - 2 * temp)

for j in range(N-1):
    X.append( 2 * C[j] - X[-1] )

Y = map(str,X)

print(' '.join(Y))

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

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

A = np.zeros((N,N),dtype = int)

for i in range(N-1):
    A[i][i] = 1
    A[i][i+1] = 1
A[N-1][0] = 1
A[N-1][N-1] = 1

B = np.array(C)

def calc_double(n):
    return n * 2

X = np.linalg.solve(A,B)
Y = map(calc_double,X.tolist())
Z = map(str,map(int,Y))

print(' '.join(Z))

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

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

A = np.zeros((N,N),dtype = int)

for i in range(N-1):
    A[i][i] = 1
    A[i][i+1] = 1
A[N-1][0] = 1
A[N-1][N-1] = 1

B = np.array(C)

X = np.linalg.solve(A,B)
Y = X.tolist()

for j in range(N):
    print(str(int(Y[j]*2)),end=' ')
Problem p02990 (python)

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

W = 10**9+7

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
    if (N-K+1) >= i and K-1 >= i-1:
        a = combinations_count(N-K+1, i) % W
        b = combinations_count(K-1, i-1) % W
        print((a*b) % W)
    else:
        print(0)

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

W = 10**9+7

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
    a = combinations_count(N-K+1, i) % W
    b = combinations_count(K-1, i-1) % W
    print((a*b) % W)
Problem p03186 (python)

Fixed submission:
a, b, c = map(int, input().split())
if (a+b)>=c:
	print(c+b)
else:
	print(a+2*b+1)

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if (a+b)>=c:
	return c+b
else:
	return a+2*b
Problem p03345 (python)

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

unfair = 10**18

if k%2 ==0:
	if abs(a-b) <= unfair:
		print(a-b)
	else:
		print('Unfair')
else:
	if abs(b-a) <= unfair:
		print(b-a)
	else:
		print('Unfair')

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

unfair = 10^18

if k%2 ==0:
	if a-b <= unfair
		print(a-b)
	else:
		print('Unfair')
else:
	if b-a <= unfair
		print(b-a)
	else:
		print('Unfair')
Problem p02793 (python)

Fixed submission:
import sys
import fractions
input = sys.stdin.readline


mod = 10 ** 9 + 7
N = int(input().strip())
A = list(map(int, input().strip().split(" ")))

lcm = 1
for a in A:
    lcm = a // fractions.gcd(a, lcm) * lcm

ans = 0
for a in A:
    ans += lcm // a

print(ans % mod)

Buggy submission (verdict: Runtime Error):
import sys
import math
input = sys.stdin.readline


mod = 10 ** 9 + 7
N = int(input().strip())
A = list(map(int, input().strip().split(" ")))

lcm = 1
for a in A:
    lcm = a // math.gcd(a, lcm) * lcm

ans = 0
for a in A:
    ans += lcm // a
    ans %= mod

print(ans)

Buggy submission (verdict: Runtime Error):
import sys
import math
input = sys.stdin.readline


mod = 10 ** 9 + 7
N = int(input())
A = list(map(int, input().strip().split(" ")))

lcm = 1
for a in A:
    lcm = a // math.gcd(a, lcm) * lcm

ans = 0
for a in A:
    ans += lcm // a

print(ans % mod)

Buggy submission (verdict: Runtime Error):
import sys
import math
input = sys.stdin.readline


mod = 10 ** 9 + 7
N = int(input())
A = list(map(int, input().strip().split(" ")))

lcm = 1
for a in A:
    lcm = a // math.gcd(a, lcm) * lcm

ans = 0
for a in A:
    ans += lcm // a

print(ans % mod)

Buggy submission (verdict: Runtime Error):
import sys
import math
input = sys.stdin.readline


mod = 10 ** 9 + 7
N = int(input())
A = list(map(int, input().split(" ")))

lcm = 1
for a in A:
    lcm = a // math.gcd(a, lcm) * lcm

ans = 0
for a in A:
    ans += lcm // a

print(ans % mod)
Problem p02835 (python)

Fixed submission:
A1, A2, A3 = map(int, input().split(" "))
print('bust' if A1 + A2 + A3 > 21 else 'win')

Buggy submission (verdict: Runtime Error):
#include <iostream>
using namespace std;

int main(void){
  int A1, A2, A3;
  cin >> A1 >> A2 >> A3;
  cout << ((A1 + A2 + A3 >= 22) ? "bust" : "win") << endl;
  return 0;
}
Problem p02836 (python)

Fixed submission:
S = input()
ans = 0
for i in range(len(S)):
  if S[i] != S[::-1][i]:
    ans += 1
print(ans // 2)

Buggy submission (verdict: Runtime Error):
S = int(input())
ans = 0
for i in range(len(S)):
  if S[i] != S[::-1][i]:
    ans += 1
print(ans)
Problem p02891 (python)

Fixed submission:
S = input()
K = int(input())

if S[0] != S[-1]:
    ans = 0
    for i in range(len(S) - 1):
        if S[i] == S[i + 1]:
            S = S[:i + 1] + '*' + S[i + 2:]
            ans += 1
    print(ans * K)
else:
    # S -> s_1 s_2 ... s_k + A + t_l t_l-1 ... t_1 (s_i = t_j)と分解
    k, l = 0, len(S) - 1
    while k < len(S) and S[k] == S[-1]:
        k += 1
    while l > -1 and S[l] == S[0]:
        l -= 1

    # 連結に関係ない部分のカウント
    A = S[k:l + 1]
    ans = 0
    for i in range(len(A) - 1):
        if A[i + 1] == A[i]:
            A = A[:i + 1] + '*' + A[i + 2:]
            ans += 1
    ans *= K

    # 連結に関係ある部分のカウント
    if l == -1 and k == len(S):
        # 全部同じ
        print((len(S) * K) // 2)
    else:
        ans += (len(S) - l + k - 1) // 2 * (K - 1)
        ans += (len(S) - l - 1) // 2 + k // 2
        print(ans)

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

if S[0] != S[-1]:
    ans = 0
    for i in range(len(S) - 1):
        if S[i] == S[i + 1]:
            S = S[:i] + '*' + S[i + 2:]
            ans += 1
    print(ans * K)
else:
    # S -> s_1 s_2 ... s_k + A + t_l t_l-1 ... t_1 (s_i = t_j)と分解
    k, l = 0, len(S) - 1
    while k < len(S) and S[k] == S[-1]:
        k += 1
    while l > -1 and S[l] == S[0]:
        l -= 1

    # 連結に関係ない部分のカウント
    A = S[k:l + 1]
    ans = 0
    for i in range(len(A) - 1):
        if A[i + 1] == A[i]:
            A = A[:i + 1] + '*' + A[i + 2:]
            ans += 1
    ans *= K

    # 連結に関係ある部分のカウント
    if l == -1 and k == len(S):
        # 全部同じ
        print((len(S) * K) // 2)
    else:
        ans += (len(S) - l + k - 1) // 2 * (K - 1)
        ans += (len(S) - l) // 2 + (k - 1) // 2
        print(ans)
Problem p02897 (python)

Fixed submission:
N = int(input().strip())
print(((N + 1) // 2) / N)

Buggy submission (verdict: Runtime Error):
N = input()
print(((N + 1) // 2) / N)
Problem p02916 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split(" ")))
B = list(map(int, input().split(" ")))
C = list(map(int, input().split(" ")))
ans = B[A[0] - 1]
for i in range(1, N):
  ans += B[A[i] - 1]
  if A[i - 1] + 1 == A[i]:
    ans += C[A[i - 1] - 1]
  
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split(" ")))
B = list(map(int, input().split(" ")))
C = list(map(int, input().split(" ")))
ans = B[A[0] - 1]
for i in range(1, N):
  ans += B[A[i] - 1]
  if A[i - 1] + 1 == A[i]:
    ans += C[A[i] - 1]
  
print(ans)
Problem p03013 (python)

Fixed submission:
n,m = map(int,input().split())
if m > 0:
    li = [int(input()) for i in range(m)]
else:
    li = [0]

#連続する壊れていない階段の数を求める
li_new = [-1]*(m+1)
li_new[0] = li[0]
for i in range(1,m):
    li_new[i] = li[i] - (li[i-1]+1)
li_new[m] = n - li[m-1]
#print(li_new)

#必用な部分までのフィボナッチ数をリストに保存
fib = [0] * (max(max(li_new)+2,3))
fib[0] = 0
fib[1] = 1
fib[2] = 1
for i in range(3,max(li_new)+2):
    fib[i] = fib[i-2] + fib[i-1]
#print(fib)

#連続する壊れていない階段の数ごとのフィボナッチ数の積
ans = 1
if m > 0:
    for i in li_new:
        ans *= fib[i]
else:
    ans = fib[n+1]
print(ans%1000000007)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
li = [int(input()) for i in range(m)]

#連続する壊れていない階段の数を求める
li_new = [-1]*(m+1)
li_new[0] = li[0]
for i in range(1,m):
    li_new[i] = li[i] - (li[i-1]+1)
li_new[m] = n - li[m-1]
#print(li_new)

#必用な部分までのフィボナッチ数をリストに保存
fib = [0] * (max(max(li_new)+1,10))
fib[0] = 0
fib[1] = 1
fib[2] = 1
for i in range(3,max(li_new)+1):
    fib[i] = fib[i-2] + fib[i-1]
#print(fib)

#連続する壊れていない階段の数ごとのフィボナッチ数の積
ans = 1
for i in li_new:
    ans *= fib[i]
print(ans%1000000007)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
li = [int(input()) for i in range(m)]

#連続する壊れていない階段の数を求める
li_new = [-1]*(m+1)
li_new[0] = li[0]
for i in range(1,m):
    li_new[i] = li[i] - (li[i-1]+1)
li_new[m] = n - li[m-1]
#print(li_new)

#必用な部分までのフィボナッチ数をリストに保存
fib = [0] * (max(max(li_new)+1,3))
fib[0] = 0
fib[1] = 1
fib[2] = 1
for i in range(3,max(li_new)+1):
    fib[i] = fib[i-2] + fib[i-1]
#print(fib)

#連続する壊れていない階段の数ごとのフィボナッチ数の積
ans = 1
for i in li_new:
    ans *= fib[i]
print(ans%1000000007)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
li = [int(input()) for i in range(m)]

#連続する壊れていない階段の数を求める
li_new = [-1]*(m+1)
li_new[0] = li[0]
for i in range(1,m):
    li_new[i] = li[i] - (li[i-1]+1)
li_new[m] = n - li[m-1]
#print(li_new)

#必用な部分までのフィボナッチ数をリストに保存
fib = [0] * (max(li_new)+1)
fib[0] = 0
fib[1] = 1
fib[2] = 1
for i in range(3,max(li_new)+1):
    fib[i] = fib[i-2] + fib[i-1]
#print(fib)

#連続する壊れていない階段の数ごとのフィボナッチ数の積
ans = 1
for i in li_new:
    ans *= fib[i]
print(ans%1000000007)
Problem p02577 (python)

Fixed submission:
n=int(input())
if n%9==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=(int.input())
if n%9==0:
  print(Yes)
else :
  print(No)
Problem p02578 (python)

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

sum = 0
for n in range(N-1):
	if a[n]>a[n+1]:
		dif=a[n]-a[n+1]
		a[n+1]=a[n+1]+dif
		sum=sum+dif
print(sum)

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

sum = 0
for n in range(N-1):
  if a[n]>a[n+1]:
    dif=a[n]-a[n+1]
    a[n+1]=a[n+1]+dif
    sum+=dif
print(sum)

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

sum = 0
for n in range(N-1):
  if a[n]>a[n+1]:
    dif=a[n]-a[n+1]
	a[n+1]=a[n+1]+dif
	sum=sum+dif
print(sum)

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

sum = 0
for n in range(N-1):
	if a[n]>a[n+1]:
		dif=a[n]-a[n+1]
		a[n+1]=a[n+1]+dif
		sum=sum+dif
print(sum)
Problem p02622 (python)

Fixed submission:
S=input()
T=input()
difference=0
for i in range(len(S)):
  if S[i]!=T[i]:
    difference+=1
print(difference)

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
differnce=0
for i in range(len(S)):
  if S[i]!=T[i]:
    difference+=1
print(difference)

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
differnce=0
for i in range(len(S)):
  if S[i]!=T[i]:
      difference+=1
print(difference)

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
 
differnce=0
 
for i in range(len(S)):
  if S[i]!=T[i]
      difference +=1
 
print(difference)

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

differnce=0

for i in range(len(S)):
  if [S[i]!=T[i])
      difference +=1

print(difference)
Problem p02659 (python)

Fixed submission:
import decimal
import math
A,B = input().split()
A = int(A)
B = decimal.Decimal(B)
print(math.floor(A*B))

Buggy submission (verdict: Runtime Error):
import math
A,B = list(map(float,input().split()))
A = int(A)
print(math.floor(A*(B*100)/100))s

Buggy submission (verdict: Runtime Error):
import math
A = int(input().rstrip()) 
B = float(input())
print(math.floor(A*(B*100)/100))

Buggy submission (verdict: Runtime Error):
import Math
A = int(input()) 
B = float(input())
print(Math.floor(A*(B*100)/100))

Buggy submission (verdict: Runtime Error):
import Math
A,B = list(map(float,input().split()))
print(Math.floor(A*(B*100)/100))

Buggy submission (verdict: Runtime Error):
import math
A,B = list(map(float,input().split()))
print(math.floor((A*(B*100))/100)

Buggy submission (verdict: Runtime Error):
A,B = list(map(float,input().split()))
print(A*(B*100))/100

Buggy submission (verdict: Runtime Error):
A,B = list(map(int,input().split()))
print(A*(B*100)/100)