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

Fixed submission:
import sys
N=int(input())
A=sorted([int(input()) for _ in range(N)])

tot=sum(A)
if tot%10 != 0:
    print(tot)
    sys.exit()
else:
    for i in range(N):
        if A[i]%10 != 0:
            print(tot-A[i])
            sys.exit()
print(0)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=sorted([int(input()) for _ in range(N)])

tot=sum(A)
if tot%10!=0:
    print(tot)
    sys.exit()
else:
    for i in range(N):
        if A[i]%10!=0:
            print(tot-A[i])
            sys.exit()
print(0)
Problem p03729 (python)

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

print("YES") if a[len(a)-1] == b[0] and b[len(b)-1] == c[0] else print("NO")

Buggy submission (verdict: Runtime Error):
a, b, c = input().split()
if a[len(a)] == b[0] and b[len(b)] == b[0]:
    print("YES")
else:
    print("NO")
Problem p03760 (python)

Fixed submission:
o = input()
e = input()
if len(o) == len(e):
    print("".join([o[i]+e[i] for i in range(len(o))]))
else:
    print("".join([o[i]+e[i] for i in range(len(e))]+[o[len(o)-1]]))

Buggy submission (verdict: Runtime Error):
o = input()
e = input()
p = [o[i]+e[i] for i in range(len(o))]
print("".join(p))
Problem p03813 (python)

Fixed submission:
a = int(input())

print("ABC") if a < 1200 else print("ARC")

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

print("ABC") if x < 1200 else print("ARC")
Problem p03826 (python)

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

print(max([a*b,c*d]))

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

print(max([a*b,c*d]))
Problem p03852 (python)

Fixed submission:
print("vowel") if input() in ["a","i","u","e","o"] else print("consonant")

Buggy submission (verdict: Runtime Error):
print("vowel") if input() in ["a","i","u","e","o"] else print("consonant
")
Problem p03853 (python)

Fixed submission:
h,w=map(int,input().split())
c=[]
for _ in range(h):
    c.append(list(map(str,input())))
    
ans=[c[i//2] for i in range(2*h)]

for j in ans:
    print(''.join(j))

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
c=[]
for _ in range(h):
    c.append(list(map(str,input())))
    
ans=[c[i//2] for i in range(2h)]

for j in ans:
    print(''.join(j))
Problem p03862 (python)

Fixed submission:
N,A=map(int,input().split())
a=list(map(int,input().split()))
cnt=0
for i in range(1,N):
    tmp=max(0,(a[i-1]+a[i])-A)
    if i==1:
        if a[1]<tmp:
            a[0]-=tmp-a[1]
            a[1]=0
            cnt+=tmp
            continue
    
    cnt+=tmp
    a[i]-=tmp
    
print(cnt)

Buggy submission (verdict: Runtime Error):
N,A=map(int,input().split())
a=list(map(int,input().split())
cnt=0
for i in range(1,N):
    tmp=max(0,(a[i-1]+a[i])-A)
    cnt+=tmp
    a[i]-=tmp
    
print(cnt)
Problem p03944 (python)

Fixed submission:
w,h,n = map(int,input().split())
l = [list(map(int,input().split())) for _ in range(n)]
xmin = 0
ymin = 0
xmax = w
ymax = h
for i in range(n):
    if l[i][2] == 1:
        xmin = max([xmin,l[i][0]])
    elif l[i][2] == 2:
        xmax = min([xmax,l[i][0]])
    elif l[i][2] == 3:
        ymin = max([ymin,l[i][1]])
    elif l[i][2] == 4:
        ymax = min([ymax,l[i][1]])
if xmax <= xmin or ymax <= ymin:
    print(0)
else:
    print((xmax - xmin) * (ymax - ymin))

Buggy submission (verdict: Runtime Error):
w,h,n=map(int,input().split())
a=[list(map(int,input().split())) for _ in range(n)]

xmin,ymin=0
xmax=w
ymax=h

for i in range(n):
    if a[i][2]==1:
        xmin=max([xmin,a[i][0]])
    elif a[i][2]==2:
        xmax=min([xmax,a[i][0]])
    elif a[i][2]==3:
        ymin=max([ymin,a[i][1]])
    else:
        ymax=min([ymax,a[i][1]])
ptint((xmax-xmin)*(ymax-ymin))
Problem p04043 (python)

Fixed submission:
s = list(map(int, input().split()))
if s.count(5)==2 and s.count(7)==1:
	print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
s = list(map(int, input().split())
if s.count(5)==2 and s.count(7)==1:
	print("YES")
else:
    print("NO")
Problem p02657 (python)

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

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

Buggy submission (verdict: Runtime Error):
a, b = input().split()
print(a * b)
Problem p02658 (python)

Fixed submission:
def calc(num_list) -> int:
    result = 1
    max = 10**18

    if 0 in num_list:
        return 0

    for num in num_list:
        result *= num
        if result > max:
            return -1
    return result

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

print(str(calc(num_list)))

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

max = pow(10, 18)
result = 1
for num in num_list:
  if num == 0:
    print(0)
    break
    else:
      result = result * num
      if result > max:
        print(-1)
        break 
        print(result)
Problem p03434 (python)

Fixed submission:

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

alice_point = 0
bob_point = 0

def pick_card(card_list):
    # print(card_list)
    max = 0
    max_index = 0
    for i in range(card_list.__len__()):
        # print('-------', i)
        if card_list[i] > max:
            # print('@', i, ':', max, '<', card_list[i])
            max = card_list[i]
            max_index = i
    
    del card_list[max_index]

    # print('----', card_list)

    return max, card_list

turn = 0
while turn < n:
    # print('--', turn)
    remain_list = []
    if turn % 2 == 0:
        alice_get, remain_list = pick_card(card_list)
        alice_point += alice_get
    else:
        bob_get, remain_list = pick_card(card_list)
        bob_point += bob_get

    card_list = remain_list
    # print(alice_point, bob_point, card_list)

    turn += 1

print(alice_point - bob_point)

Buggy submission (verdict: Runtime Error):

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

alice_point = 0
bob_point = 0

def pick_card(card_list):
    # print(card_list)
    max = 0
    max_index = 0
    for i in range(card_list.__len__()):
        # print('-------', i)
        if card_list[i] > max:
            # print('@', i, ':', max, '<', card_list[i])
            max = card_list[i]
            max_index = i
    
    del card_list[max_index]

    # print('----', card_list)

    return max, card_list

def sort_card(card_list: list):
    return sorted(card_list)

turn = 0
sorted_list = sort_card(card_list)
while turn < n:
    # print('--', turn)
    if turn % 2 == 0:
        # alice_get, remain_list = pick_card(card_list)
        # alice_point += alice_get
        alice_point += sorted_list.pop(turn)
    else:
        # bob_get, remain_list = pick_card(card_list)
        # bob_point += bob_get
        bob_point += sorted_list.pop(turn)

    # card_list = remain_list
    print(alice_point, bob_point, card_list)

    turn += 1

print(alice_point - bob_point)

Buggy submission (verdict: Runtime Error):

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

alice_point = 0
bob_point = 0

def pick_card(card_list):
    # print(card_list)
    max = 0
    max_index = 0
    for i in range(card_list.__len__()):
        # print('-------', i)
        if card_list[i] > max:
            # print('@', i, ':', max, '<', card_list[i])
            max = card_list[i]
            max_index = i
    
    del card_list[max_index]

    # print('----', card_list)

    return max, card_list

def sort_card(card_list: list):
    return card_list.sort()

turn = 0
while turn < n:
    # print('--', turn)
    sorted_list = sort_card(card_list)
    if turn % 2 == 0:
        # alice_get, remain_list = pick_card(card_list)
        # alice_point += alice_get
        alice_point += sorted_list.pop()
    else:
        # bob_get, remain_list = pick_card(card_list)
        # bob_point += bob_get
        bob_point += sorted_list.pop()

    card_list = remain_list
    # print(alice_point, bob_point, card_list)

    turn += 1

print(alice_point - bob_point)
Problem p02761 (python)

Fixed submission:
import sys
N,M = map(int,input().split())
ans = [0]*N
dict1 = {}
if  N > 1:
    ans[0] = 1
for x in range(M):
    a,b = map(int,input().split())
    if((a in dict1) != True):
        dict1[a] = b
    elif(a in dict1 and dict1[a] != b):
        print(-1)
        sys.exit()
for k, v in dict1.items():
    ans[k-1] = v
    if(k == 1 and v == 0 and N >= 2):
        print(-1)
        sys.exit()
#print(ans)
l = "".join([str(n) for n in ans])
int_l = int(l)
print(int_l)
#len_l = len(str(int_l))
#print(int_l)

Buggy submission (verdict: Runtime Error):
import sys
N,M = map(int,input().split())
ans = [0]*N
dict1 = {}
if  n > 1:
    ans[0] = 1
for x in range(M):
    a,b = map(int,input().split())
    if((a in dict1) != True):
        dict1[a] = b
    elif(a in dict1 and dict1[a] != b):
        print(-1)
        sys.exit()
for k, v in dict1.items():
    ans[k-1] = v
    if(k == 1 and v == 0 and N >= 2):
        print(-1)
        sys.exit()
#print(ans)
l = "".join([str(n) for n in ans])
int_l = int(l)
print(int_l)
#len_l = len(str(int_l))
#print(int_l)

Buggy submission (verdict: Runtime Error):
import sys
N,M = map(int,input().split())
ans = [0]*N
dict1 = {}
for x in range(M):
    a,b = map(int,input().split())
    if((a in dict1) != True):
        dict1[a] = b
    elif(a in dict1 and dict1[a] != b)):
        print(-1)
        sys.exit()
for k, v in dict1.items():
    ans[k-1] = v
    if(k == 1 and v == 0 and N == 3):
        print(-1)
        sys.exit()
    elif(k == 1 and v == 0 and N ==2):
        print(-1)
        sys.exit()
#print(ans)
l = "".join([str(n) for n in ans])
int_l = int(l)
print(int_l)
#len_l = len(str(int_l))
#print(int_l)

Buggy submission (verdict: Runtime Error):
import sys
N,M = map(int,input().split())
ans = [0]*N
dict1 = {}
for x in range(M):
    a,b = map(int,input().split())
    if((a in dict1) != True):
        dict1[a] = b
    elif(a in dict1 and dict1[a] != b)):
        print(-1)
        sys.exit()
for k, v in dict1.items():
    ans[k-1] = v
    if(k == 1 and v == 0 and N == 3):
        print(-1)
        sys.exit()
    elif(k == 1 and v == 0 and N ==2):
        print(-1)
        sys.exit()
#print(ans)
l = "".join([str(n) for n in ans])
int_l = int(l)
print(int_l)
#len_l = len(str(int_l))
#print(int_l)
Problem p02681 (python)

Fixed submission:
S=input()
T=input()
T=T[:-1]
if(S==T):
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
A=list(map(int,input().split()))
town=1
townhairetu=[1]
n=0
for i in range(K):
	town=A[town-1]
	if(town in townhairetu):
		n=i+1-townhairetu.index(town)
		break
	else:
		townhairetu.append(town)
print(townhairetu[(K-townhairetu.index(town))%n+townhairetu.index(town)])
Problem p03597 (python)

Fixed submission:
N=int(input())
A=int(input())
B=N**2-A
print(B)

Buggy submission (verdict: Runtime Error):
N=int(input())
K=int(input())
a=list(map(int,input().split()))
s=0
for i in range(len(a)):
  if a[i]<=K-a[i]:
    s=s+2*a[i]
  else:
    s=s+2*(K-a[i])
print(s)
Problem p03206 (python)

Fixed submission:
n = int(input())
l = ["Christmas"]
for i in range(25-n):
    l.append("Eve")
print(*l)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(n):
    x = int(input())
    l.append(x)
l.sort()
l = l[::-1]
ans = 0 
ans += l[0]//2
for i in range(1,n):
    ans+=l[i]
print(ans)
Problem p02657 (python)

Fixed submission:
a,b=(int(x) for x in input().split())
print(a*b)

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

for numb in number:
  sum *= numb
if(sum > pow(10,18)):
	print(-1)
else:
  print(sum)
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = int(input()), int(input())
print(a * b)
Problem p02669 (python)

Fixed submission:
_, *e = [[*map(int, t.split())] for t in open(0)]

for n, a, b, c, d in e:
    mem = {0: 0, 1: d}
    mult_cost = {2: a, 3: b, 5: c}

    def solve(n):
        if n not in mem:
            tmp = n*d
            for k in mult_cost:
                if n % k == 0:
                    tmp = min(tmp, solve(n//k) + mult_cost[k])
                else:
                    tmp = min(tmp, solve(
                        n//k) + mult_cost[k] + (n % k)*d, solve(n//k + 1) + mult_cost[k] + k*d - (n % k)*d)
            mem[n] = tmp
        return mem[n]

    print(solve(n))

Buggy submission (verdict: Runtime Error):
[n], *e = [[*map(int, t.split())] for t in open(0)]
viewers = set(range(1, n**2 + 1))
mem = {x: min((x - 1) % n, (n - x) % n, (x - 1)//n, n - 1 - (x - 1)//n)
       for x in range(1, n**2 + 1)}

ans = 0


def directions(x):
    tmp = []
    if x % n != 1:
        tmp.append(x - 1)
    if x % n > 0:
        tmp.append(x + 1)
    if (x - 1)//n > 0:
        tmp.append(x - n)
    if (x - 1)//n < n - 1:
        tmp.append(x + n)
    return tmp


for x in e[0]:

    def bfs(x):
        queue = [x]
        while queue:
            tmp = queue.pop(0)
            z = mem[tmp] + (tmp in viewers)
            for k in directions(tmp):
                if mem[k] > z:
                    mem[k] = z
                    queue.append(k)

    ans += mem[x]
    viewers.remove(x)
    bfs(x)

print(ans)

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

[n], *e = [[*map(int, t.split())] for t in open(0)]
viewers = set(range(1, n**2 + 1))
mem = {x: min((x - 1) % n, (n - x) % n, (x - 1)//n, n - 1 - (x - 1)//n)
       for x in range(1, n**2 + 1)}


def directions(x):
    tmp = []
    if x % n != 1:
        tmp.append(x - 1)
    if x % n > 0:
        tmp.append(x + 1)
    if (x - 1)//n > 0:
        tmp.append(x - n)
    if (x - 1)//n < n - 1:
        tmp.append(x + n)
    return tmp


ans = 0

for x in e[0]:

    def fill(x):
        z = mem[x] + (x in viewers)
        for k in directions(x):
            if mem[k] > z:
                mem[k] = z
                fill(k)

    ans += mem[x]
    viewers.remove(x)
    fill(x)

print(ans)

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

[n], *e = [[*map(int, t.split())] for t in open(0)]
viewers = set(range(1, n**2 + 1))
mem = {x: min((x - 1) % n, (n - x) % n, (x - 1)//n, n - 1 - (x - 1)//n)
       for x in range(1, n**2 + 1)}


def directions(x):
    tmp = []
    if x % n != 1:
        tmp.append(x - 1)
    if x % n > 0:
        tmp.append(x + 1)
    if (x - 1)//n > 0:
        tmp.append(x - n)
    if (x - 1)//n < n - 1:
        tmp.append(x + n)
    return tmp

ans = 0

for x in e[0]:

    def fill(x):
        z = mem[x] + (x in viewers)
        for k in directions(x):
            if mem[k] > z:
                mem[k] = z
                fill(k)

    ans += mem[x]
    viewers.remove(x)
    fill(x)
    display()

print(ans)
Problem p02675 (python)

Fixed submission:
def solution():
    n = int(input())
    bon = [3]
    pon = [0, 1, 6, 8]
    last = n % 10
    if last in bon:
        return 'bon'
    elif last in pon:
        return 'pon'
    else:
        return 'hon' 
    
print(solution())

Buggy submission (verdict: Runtime Error):
import math
def solution():
    a, b, h, m  = map(int, input().split())
    return round((a**2 + b**2 -2*a*b*math.cos(2*math.pi*(h/12 - m/60)))**0.5, 9)

print(solution())

Buggy submission (verdict: Runtime Error):
import math
def solution():
    a, b, h, m  = map(int, input().split())
    return (a**2 + b**2 -2*a*b*round(math.cos(2*math.pi*(h/12 - m/60)), 9))**0.5

print(solution())
Problem p02677 (python)

Fixed submission:
from math import *
def solution():
    a, b, h, m  = map(int, input().split())
    return (a*a+b*b-2*a*b*cos((m*11/360-h/6)*pi))**.5
print(solution())

Buggy submission (verdict: Runtime Error):
import math
def solution():
    a, b, h, m  = map(int, input().split())
    return (a*a+b*b-2*a*b*cos((m*11/360-h/6)*pi))**.5
print(solution())

Buggy submission (verdict: Runtime Error):
import math
def solution():
    a, b, h, m  = map(int, input().split())
    return math.round((a**2 + b**2 -2*a*b*math.cos(2*math.pi*(h/12 - m/60)))**0.5, 9)

print(solution())

Buggy submission (verdict: Runtime Error):
import math
def solution():
    a, b, h, m  = map(int, input().split())
    return math.round((a**2 + b**2 -2*a*b*math.cos(2*math.pi*(h/12 - m/60)))**0.5, 9)

print(solution())

Buggy submission (verdict: Runtime Error):
import math
def solution():
    a, b, h, m  = map(int, input().split())
    return (a**2 + b**2 -2*a*b*round(math.cos(2*math.pi*(h/12 - m/60)), 9)**0.5

print(solution())

Buggy submission (verdict: Runtime Error):
import math
def solution():
    [a, b, h, m] = [int(input()) for _ in range(4)]
    return pow(a**2 + b**2 -2*a*b*round(math.cos(2*math.pi*(h/12 - m/60)), 9), 0.5)

print(solution())

Buggy submission (verdict: Runtime Error):
import math
def solution():
    a, b, h, m = [int(input()) for i in range(4)]
    return pow(a**a + b*b -2*a*b*math.cos(2*math.pi*(h/12 - m/60)))

print(solution())
Problem p02678 (python)

Fixed submission:
(n,m),*e=[[*map(int, t.split())] for t in open(0)]
t=[[]for _ in range(n+1)]
for a,b in e:t[a]+=[b];t[b]+=[a]
q=[1]
a=[0]*-~n
while q:q=[a[j]==0and(a.__setitem__(j,i)or j)for i in q for j in t[i]]
print('Yes',*a[2:])

Buggy submission (verdict: Runtime Error):
(n,m),*e=[[*map(int, t.split())] for t in input()]
t=[[]for _ in range(n+1)]
for a,b in e:t[a]+=[b];t[b]+=[a]
q=[1]
a=[0]*-~n
while q:q=[a[j]==0and(a.__setitem__(j,i)or j)for i in q for j in t[i]]
print('Yes',*a[2:])
Problem p02681 (python)

Fixed submission:
s = str(input())
t = str(input())
ans = 'No'
if s == t[:-1]:
    ans = 'Yes'
print(ans)

Buggy submission (verdict: Runtime Error):
[n, k], [*a] = [[*map(int, t.split())] for t in open(0)]
count = 0
visited = dict()
tmp = 1
while count <= k and tmp not in visited:
    visited[tmp] = count
    tmp = a[tmp - 1]
    count += 1
if count <= k:
    k = (k - count) % (count - visited[tmp])
    for _ in range(k):
        tmp = a[tmp - 1]
print(tmp)
Problem p03407 (python)

Fixed submission:
import sys

[a, b, c] = map(int,sys.stdin.readline().split())

if a + b >= c :
    print("Yes")
else : 
    print("No")

Buggy submission (verdict: Runtime Error):
a, b, c = sys.stdin.readline().split()

if a + b >= c:
    print("Yes")
else : 
    print("No")
Problem p02742 (python)

Fixed submission:
H, W = list(map(int, input().split()))
if H==1 or W==1:
    print(1)
    exit()
res = int((H+1)/2) * W
if H%2==1:
    res -= int(W/2)
print(res)

Buggy submission (verdict: Runtime Error):
h = int(input(""))
w = int(input(""))
if h*w % 2 == 0:
    print(h*w/2)
else:
    print((h*w+1)/2)

Buggy submission (verdict: Runtime Error):
h = int(input(""))
w = int(input(""))
if h*w % 2 == 0:
    print(h*w/2)
if h*2%2 == 1:
    print((h*w+1)/2)
Problem p02657 (python)

Fixed submission:
import sys
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
from collections import deque
from bisect import bisect_left
from itertools import product
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
#文字列を一文字ずつ数字に変換、'5678'を[5,6,7,8]とできる
def LSI(): return list(map(int, list(sys.stdin.readline().rstrip())))
def LSI2(N): return [list(map(int, list(sys.stdin.readline().rstrip()))) for i in range(N)]
#文字列として取得
def ST(): return sys.stdin.readline().rstrip()
def LST(): return sys.stdin.readline().rstrip().split()
def LST2(N): return [sys.stdin.readline().rstrip().split() for i in range(N)]
def FILL(i,h): return [i for j in range(h)]
def FILL2(i,h,w): return [FILL(i,w) for j in range(h)]
def FILL3(i,h,w,d): return [FILL2(i,w,d) for j in range(h)]
def FILL4(i,h,w,d,d2): return [FILL3(i,w,d,d2) for j in range(h)]
def sisha(num,digit): return Decimal(str(num)).quantize(Decimal(digit),rounding=ROUND_HALF_UP)
#'0.01'や'1E1'などで指定、整数に戻すならintをかます
MOD = 1000000007
INF = float("inf")
sys.setrecursionlimit(10**6+10)

A,B = MI()
print(A*B)

Buggy submission (verdict: Runtime Error):
zimport sys
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
from collections import deque
from bisect import bisect_left
from itertools import product
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
#文字列を一文字ずつ数字に変換、'5678'を[5,6,7,8]とできる
def LSI(): return list(map(int, list(sys.stdin.readline().rstrip())))
def LSI2(N): return [list(map(int, list(sys.stdin.readline().rstrip()))) for i in range(N)]
#文字列として取得
def ST(): return sys.stdin.readline().rstrip()
def LST(): return sys.stdin.readline().rstrip().split()
def LST2(N): return [sys.stdin.readline().rstrip().split() for i in range(N)]
def FILL(i,h): return [i for j in range(h)]
def FILL2(i,h,w): return [FILL(i,w) for j in range(h)]
def FILL3(i,h,w,d): return [FILL2(i,w,d) for j in range(h)]
def FILL4(i,h,w,d,d2): return [FILL3(i,w,d,d2) for j in range(h)]
def sisha(num,digit): return Decimal(str(num)).quantize(Decimal(digit),rounding=ROUND_HALF_UP)
#'0.01'や'1E1'などで指定、整数に戻すならintをかます
MOD = 1000000007
INF = float("inf")
sys.setrecursionlimit(10**6+10)

A,B = MI()
print(A*B)
Problem p02705 (python)

Fixed submission:
import sys
import math
from collections import deque
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def S(): return sys.stdin.readline()
def LS(): return sys.stdin.readline().split()
def LS2(N): return [sys.stdin.readline().split() for i in range(N)]
def FILL(i,h,w): return [[i for j in range(w)] for k in range(h)]
def sisha(num,digit): return Decimal(str(num)).quantize(Decimal(digit),rounding=ROUND_HALF_UP)
#'0.01'や'1E1'などで指定、整数に戻すならintをかます
MOD = 1000000007
INF = float("inf")
sys.setrecursionlimit(10**6+10)
input = sys.stdin.readline

R = I()
print(2*math.pi*R)

Buggy submission (verdict: Runtime Error):
import sys
import math
from collections import deque
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def S(): return sys.stdin.readline()
def LS(): return sys.stdin.readline().split()
def LS2(N): return [sys.stdin.readline().split() for i in range(N)]
def FILL(i,h,w): return [[i for j in range(w)] for k in range(h)]
def sisha(num,digit): return Decimal(str(num)).quantize(Decimal(digit),rounding=ROUND_HALF_UP)
#'0.01'や'1E1'などで指定、整数に戻すならintをかます
MOD = 1000000007
INF = float("inf")
sys.setrecursionlimit(10**6+10)
input = sys.stdin.readline

N = I()
l = LI()
array = [i for i in range(N)]
happy = 0
while True:
    for i in range(N-1):
        left = array[i]
        right = array[i+1]
        left_p = 1 if i-left>=0 else -1
        right_p = 1 if i+1-right<=0 else -1
        if left_p*l[left]+right_p*l[right]>0:
            happy += left_p*l[left]+right_p*l[right]
            array[i],array[i+1] = array[i+1],array[i]
            break
    else:
        break
print(happy)