Problem:


Score: 100 points

Problem Statement

There is a train going from Station A to Station B that costs X yen (the currency of Japan).

Also, there is a bus going from Station B to Station C that costs Y yen.

Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus.

How much does it cost to travel from Station A to Station C if she uses this ticket?

Constraints

1 \leq X,Y \leq 100

Y is an even number.

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

If it costs x yen to travel from Station A to Station C, print x.

Sample Input 1

81 58

Sample Output 1

110

The train fare is 81 yen.

The train fare is 58 ⁄ 2=29 yen with the 50% discount.

Thus, it costs 110 yen to travel from Station A to Station C.

Sample Input 2

4 54

Sample Output 2

31



Sample input:
81 58


Sample output:
110

Submission status: Runtime Error

Solution code:
#import time as time

#s = time.time()

n,m = map(int,input().split())
py = []
od = [[]*1 for i in range(n)]

#print ("create list: " + str(time.time() - s) )

#s = time.time()
for i in range(0,m):
    p,y = map(int,input().split())
    py.append([p,y])
       
    odlen = len(od[p-1])
    if odlen >= 1 :

        low = 0
        high = odlen - 1
        mid = odlen//2

        while low <= high:
            mid = (low + high) >> 1
            guess = od[p-1][mid]
            if guess == y:
                break
            if guess > y :
                high = mid - 1
            else:
                low  = mid + 1

        od[p-1].insert(low,y)

    else:
        od[p-1].append(y)

#print ("sort: " + str(time.time() - s) )

#s = time.time()
for i in range(0,m):
    r = od[py[i][0]-1].index(py[i][1])

    tmp = py[i][0]
    digit = 0
    while tmp > 0 :        
        digit += 1
        tmp = tmp // 10
    
    for j in range(6-digit):
        print('0',end="")
    print(py[i][0],end="")

    tmp = r + 1
    digit = 0
    while tmp > 0 :        
        digit += 1
        tmp = r // 10

    for j in range(6-digit):
        print('0',end="")
    print(r+1)

#print ("index: " + str(time.time() - s) )

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())

print(int(x+y/2))

Submission status: Runtime Error

Solution code:
def ins(arr, x):
    b=len(arr)-1
    a=0
    while (b-a)>1:
        m=int((a+b)/2)
        if x>=arr[m]:
            a=m
        else:
            b=m      
    if b==-1:
        return 0
    elif arr[b]<x:
        return b+1
    elif arr[a]>x:
        return a
    
    return b

N,M=map(int,input().split(' '))
ys=(tuple(map(int,input().split(' '))) for i in range(M))

citys=[[] for i in range(N)]
dic={}
for y in ys:
    ci=y[0]-1
    index=ins(citys[ci], y[1])
    citys[ci].insert(index, y[1])

for city in citys:
    for i in range(len(city)):
        dic[city[i]]=i+1
        
for y in ys:
    number=str(10**12+y[0]*10**6+dic[y[1]])[-12:]
    print(number)

Submission status: Runtime Error

Solution code:
X, Y = map(int, input().slipt())
print(X + Y // 2)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
print(int(a+b/2))

Submission status: Runtime Error

Solution code:
s = input().split()
w = int(s[1])/2
print(int((s[0])+w)

Submission status: Runtime Error

Solution code:
s = input().split()
print(int((s[0])+(int(s[1]))/2))

Submission status: Runtime Error

Solution code:
s = input().split()
print(int((s[0])+int(s[1]))/2)

Submission status: Runtime Error

Solution code:
n = int(input())
t,a = map(int,input().split())
lis = list(map(int,input().split()))
 
li = abs((t-lis[0]*0.006)-a)
l = 0
for i in range(1,n):
    if abs((t-lis[i]*0.006)-a) < li:
        li=abs((t-lis[i]*0.006)-a)
        l=i
print(l+1)

Submission status: Runtime Error

Solution code:
n=int(input())
t,a=map(int,input().split())
lis=list(map(int,input().split()))
li=abs((t-lis[0]*0.006)-a)
l=0
for i in range(1,n):
    if abs((t-lis[i]*0.006)-a) < li:
        li=abs((t-lis[i]*0.006)-a)
        l=i
print(l+1)

Submission status: Runtime Error

Solution code:
n=int(input())
t,a=map(int,input().split())
lis=list(map(int,input().split()))
li,l=abs((t-lis[0]*0.006)-a),0
for i in range(1,n):
    b = abs((t-lis[i]*0.006)-a)
    if b < li:
        li=b
        l=i
print(l+1)

Submission status: Runtime Error

Solution code:
n=int(input());t,a=map(int,input().split())
lis=list(map(int,input().split()))
li,l=abs((t-lis[0]*0.006)-a),0
for i in range(1,n):
    b = abs((t-lis[i]*0.006)-a)
    if b < li:
        li=b
        l=i
print(l+1)

Submission status: Runtime Error

Solution code:
n=int(input());t,a=map(int,input().split())
lis=list(map(int,input().split()));li,l=abs((t-lis[0]*0.006)-a),0
for i in range(1,n):if abs((t-lis[i]*0.006)-a) < li:li,l=abs((t-lis[i]*0.006)-a),i
print(l+1)

Submission status: Runtime Error

Solution code:
i=lambda:map(int,input().split());i();t,a=i();c=[abs(t-0.006*b-a)for b in i()];print(c.index(min(c))+1)

Submission status: Runtime Error

Solution code:
print(int(input()) + (int(input())/2))

Submission status: Runtime Error

Solution code:
X,Y=map(int,input())
print(X+Y//2)
for i in range(20**7):
  pass

Submission status: Runtime Error

Solution code:
X,Y=map(int,input())
print(X+Y//2)

Submission status: Runtime Error

Solution code:
n=[int i for i in input.split()]
print(n[0]+n[1]/2)

Submission status: Runtime Error

Solution code:
n=[int(i) for i in input.split()]
print(n[0]+n[1]/2)

Submission status: Runtime Error

Solution code:
x, y = list(map(input().split(), int))
print(x + y//2)

Submission status: Runtime Error

Solution code:
a,b = map(int input().split())
b = b / 2
result = a + b
print(result)

Submission status: Runtime Error

Solution code:
a, b = (int(x) for x in input().split())
b = b / 2
result = a + new_b
print(result)

Submission status: Runtime Error

Solution code:
#A-B間の運賃の入力
X = int(input())
#B-C間の運賃の入力
Y = int(input())
#制約
if  X < 0 or Y%2 != 0 or Y > 100:
    SystemExit
#A-C合計運賃の計算と出力
print(X+Y/2)

Submission status: Runtime Error

Solution code:
#A-B間の運賃の入力
X = int(input())
#B-C間の運賃の入力
Y = int(input())
#制約
if X < 1 or Y > 100 or Y%2 == 0:
#A-C合計運賃の計算と出力
print(X+Y/2)

Submission status: Runtime Error

Solution code:
#A-B間の運賃の入力
a = int(input())
#B-C間の運賃の入力
b = int(input())
#A-C合計運賃の計算と出力
print(a+b/2)

Submission status: Runtime Error

Solution code:
X=int(input())
Y=int(input())

print((X+Y)/2)

Submission status: Runtime Error

Solution code:
a = input().split()
print(a[0] + a[1]/2)

Submission status: Runtime Error

Solution code:

if __name__ == '__main__':
  
  x = (int)(input())
  y = (int)(input())

  print(x + int(y/2))

Submission status: Runtime Error

Solution code:

x = input()
y = input()

print(x + int(y/2))

Submission status: Runtime Error

Solution code:

x = input()
y = input()

print(x + (y//2))

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = map( int, input().split())
H = list( map( int, input.split()))
         
K = []
Ksorted=[]
tmp=[]
 
for i in range(N):
  tmp.append( T - H[i] * 0.006)
  K.append(abs( A - tmp[i]))
  Ksorted = sorted(K)
  
T = K.index(Ksorted[0])
print(T+1)

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = map( int, input().split())
H = list( map( int, input.split()))
         
K = []
Ksorted=[]
tmp=[]
 
for i in range(N):
  tmp.append( T - H[i] * 0.006)
  K.append(abs( A - tmp[i]))
  Ksorted = sorted(K)
  
T = K.index(Ksorted[0])

Submission status: Runtime Error

Solution code:
x, y = map(int, input().split())
print("{}".format(x+y/2)

Submission status: Runtime Error

Solution code:
inp = input()
x, y = inp.split()
print(int(x + y/2))

Submission status: Runtime Error

Solution code:
inp = input()
x, y = inp.split(' ')
print(x + y/2)

Submission status: Runtime Error

Solution code:
X, Y = map(int, input.split())

a = X + Y/2

print(a)

Submission status: Runtime Error

Solution code:
print(int(input()) + int(input()) // 2)

Submission status: Runtime Error

Solution code:
print(int(input()) + int(input() / 2))

Submission status: Runtime Error

Solution code:
x = int(raw_input())
y = int(raw_input())
print x+y/2

Submission status: Runtime Error

Solution code:
x = int(raw_input())
y = int(raw_input())
print(x+y/2)

Submission status: Runtime Error

Solution code:
print(int(input())+int(input())/2)

Submission status: Runtime Error

Solution code:
print(int(input())+Int(input())/2)

Submission status: Runtime Error

Solution code:
import numpy as np

n = int(input())
t,a = map(int, input().split())
h = input().split()

h = np.array(h, dtype = float)
h = t - 0.006 * h
h = abs(a-h)
print(np.argmin(h)+1)

Submission status: Runtime Error

Solution code:
import sys

x = sys.argv[1]
y = sys.argv[2]

a_to_b = int(x)
b_to_c = int(y) / 2

print(a_to_b + b_to_c)

Submission status: Runtime Error

Solution code:
import sys

x = sys.argv[1]
y = sys.argv[2]

a_to_b = x
b_to_c = y/2

print(a_to_b + b_to_c)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())/2
print(a+b)

Submission status: Runtime Error

Solution code:
import sys
args=sys.argv

x=int(args[1])
y=int(args[2])

print(x+y/2)

Submission status: Runtime Error

Solution code:
#M num of prefecture
#N num of city
N, M = map(int,input().split())
#P pref
#Y year
P=[]
Y=[]
cities=[]
for i in range(M):
    try:
        s = input()
        p,y = s.split()
        city=(p,y)
        cities.append(city) 
        P.append(p)
        Y.append(y)
    except:
        break

sort_city=sorted(cities,key=lambda x:(x[0],x[1]))
prefs = sorted(set(P))

address=[]
res=[]
for i in range(len(sort_city)): 
    address=str(sort_city[i][0]).rjust(6,'0')+str(i+1).rjust(6,'0')
    res.append((sort_city[i],address))

print(res[1][0])
for i in range(len(cities)):
    for j in range(len(res)):
        if cities[i] == res[j][0]:
            print(res[j][1])

Submission status: Runtime Error

Solution code:
p_y = []
p_y_dict = {}

N, M = map(int, input().split())
for i in range(M):
  p, y = map(int, input().split())
  p_y.append([p, y])
  p_y_dict.setdefault(p, []).append(y)

sorted_py_dict = {p: sorted(y) for p, y in p_y_dict.items()}

for a in p_y: 
  print(str(a[0]).zfill(6) + str(sorted_py_dict[a[0]].index(a[1]) + 1).zfill(6))

Submission status: Runtime Error

Solution code:
x,y = int(input().split())
print(int(x + y/2))

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())

result = x + y/2
print(int(result))

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())
result = x + y *0.5
print(result)

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())

print( x + y * 0.5)

Submission status: Runtime Error

Solution code:
X = input()
Y = input()

print((X+Y)/2)

Submission status: Runtime Error

Solution code:
import numpy as np

N = input()
T,A = map(int,input().split())
li = input().split()

celsiuses = []
for i for li:
	celsius = T-li[i]*0.006
	celsiuses.append(celsius)

def getNearValue(list, num):
	idx = np.abs(np.asarray(list) - num).argmin()
	return list[idx]

if __name__ = "__main__":

ans = getNearValue(celsiuses, A)

ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
l = map(int, input().split())

print(l[0] + l[1]//2)

Submission status: Runtime Error

Solution code:
l = map(int, input().split())

print(l[0] + l[1]/2)

Submission status: Runtime Error

Solution code:
X, Y = map(int, raw_input().split())

print(X + Y//2)

Submission status: Runtime Error

Solution code:
X Y = map(int, raw_input().split())

print(X + Y//2)

Submission status: Runtime Error

Solution code:
l = map(int, raw_input().split())

print(l[0] + l[1]//2)

Submission status: Runtime Error

Solution code:
l = input().strip().split()
print(int(l[0] + l[1]/2))

Submission status: Runtime Error

Solution code:
l = input().strip().split()
print(l[0] + l[1]/2)

Submission status: Runtime Error

Solution code:
l = input().strip().split()
print(l[0] + l[1]/2)

Submission status: Runtime Error

Solution code:
l = input().split()
print(l[0] + l[1]/2)

Submission status: Runtime Error

Solution code:
l = input().split()
print(l[0] + l[2]/2)

Submission status: Runtime Error

Solution code:
l = input().split()
print(l[0] + l[3]/2)

Submission status: Runtime Error

Solution code:
l = map(int, input().split())

print(l[0] + l[3]/2)

Submission status: Runtime Error

Solution code:
l = map(int, raw_input().split())

print(l[0] + l[3]/2)

Submission status: Runtime Error

Solution code:
l = map(int, input().split())
 
print(int(l[0] + l[1]/2))

Submission status: Runtime Error

Solution code:
l = map(int, input().split())
 
print(int(l[0] + l[1] / 2))

Submission status: Runtime Error

Solution code:
l = map(int, raw_input().split())
 
print(int(l[0] + l[1] / 2))

Submission status: Runtime Error

Solution code:
l = map(int, raw_input().split())

print(l[0] + l[1] / 2)

Submission status: Runtime Error

Solution code:
l = map(int, raw_input().split())

print(l[0] + l[1]/2)

Submission status: Runtime Error

Solution code:
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int x = sc.nextInt();
    int y = sc.nextInt();
    System.out.println(x + y/2);
  }
}

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split( ))
ls_a = []
ls_b = [[] for i in range(n)]
for i in range(m):
    p,y = map(int,input().split( ))
    ls_a.append([p,y])
    ls_b[p-1].append(y)
for i in range(n):
    if len(ls_b[i]) !=0:
        ls_b[i].sort()
for i in range(m):
    print(str(ls_a[i][0]).zfill(6) + str(ls_b[ls_a[i][0]-1].index(ls_a[i][1])+1).zfill(6))

Submission status: Runtime Error

Solution code:
X,Y = map(int, input(),split())
XY = int(X + Y / 2)
print(XY)

Submission status: Runtime Error

Solution code:
X,Y = map(int, input(),split())
XY = X + Y / 2
print(XY)

Submission status: Runtime Error

Solution code:
X,Y = map(int, input(),split())
print(X + (Y / 2))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

from collections import defaultdict

def tostring(p,j):
    p = str(p+1)
    j = str(j+1)
    return (6 - len(p))*"0" + p + (6-len(j)) *"0" + j


if __name__ == "__main__":
    N, M = map(int, input().split())

    py = [[] for _ in range(N)]

    dat = [tuple(map(int, input().split())) for _ in range(M)]

    for i in range(M):
        p,y = dat[i]
        py[p-1].append((y,i))
    
    for p in range(N):
        py[p] = sorted(py[p])
    
    answer = M * [None]

    for p in range(N):
        for j in range(len(py[p])):
            y,i = py[p][j]
            answer[i]= tostring(p,j)
    
    for a in answer:
        print(a)

Submission status: Runtime Error

Solution code:
x,y = list(map(int,input().split())
print(x+y/2)

Submission status: Runtime Error

Solution code:
h,w,k = map(int, input().split())

if w == 1:
    print(1)
    exit(0)

case = []

def createCase(s):
    if (len(s) == w-1):
        case.append(s)
        return
    if len(s) != 0 and s[-1] == "1" :
        createCase(s+"0")
    else:
        createCase(s+"0")
        createCase(s+"1")

createCase("")

for i in range(len(case)):
    case[i] = "0"+case[i]+"0"

# print(case)

move = [[0]*3 for _ in range(w)]

for i in range(w):
    for j in case:
        if j[i] == j[i+1] == "0":
            move[i][1] += 1
        if j[i+1] == "1":
            move[i][2] += 1
        if j[i] == "1":
            move[i][0] += 1

# print(move)

dp = [[0]*w for _ in range(h)]

fib = [0, 1, 2, 3, 5, 8, 13, 21]

dp[0][0] = fib[w-1]
dp[0][1] = fib[w-2]

for i in range(1, h):
    dp[i][0] = (dp[i-1][0]*move[0][1] + dp[i-1][1]*move[1][0]) % 1000000007
    for j in range(1, w-1):
        dp[i][j] = (dp[i-1][j]*move[j][1] + dp[i-1][j-1]*move[j-1][2] + dp[i-1][j+1]*move[j+1][0]) % 1000000007
    dp[i][-1] = (dp[i-1][-2]*move[-2][2] + dp[i-1][-1]*move[-1][1]) % 1000000007

# print(dp)

print(dp[-1][k-1])

Submission status: Runtime Error

Solution code:
import sys

def solve (a,b):
    c=int(b)//2
    D=int(a)+int(c)
    print(D)
    
def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    return (a, b)

def main():
    print(solve(*readQuestion()))

# Uncomment before submission
 main()

Submission status: Runtime Error

Solution code:
improt sys

def solve (a,b):
    c=int(b)//2
    D=int(a)+int(c)
    print(D)

def readQuestion（）：
    ws = sys.stdin.readline（）。strip（）。split（）
    a = int（ws [0]）
    b = int（ws [1]）
    return（a、b）

def main（）：
    print（solve（* readQuestion（）））

＃提出前にコメントを外す
main（）

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=int(b)//2
D=int(a)+int(c)
print(D)

Submission status: Runtime Error

Solution code:
N = int(input())
T,A = map(int,input().split())
h = list(map(int,input().split()))
#iは番号
ans = 0
base = T - 0.006*h[0]
for i,n in enumerate(h):
    if(i==0):
        pass
    tem = T - 0.006*n
    if(abs(tem - A)<abs(base - A)):
        base = tem
        ans = i+1
    else:
        ans = 1
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
T,A = map(int,input().split())
h = list(map(int,input().split()))
#iは番号
ans = 0
base = T - 0.06*h[0]
for i,n in enumerate(h):
    if(i==0):
        pass
    tem = T - 0.006*n
    if(abs(tem - A)<abs(base - A)):
        base = tem
        ans = i+1
    else:
        ans = 1
print(ans)

Submission status: Runtime Error

Solution code:
x,y=(int(i) for  i in input().split(' ')
print(x+y//2)

Submission status: Runtime Error

Solution code:
list = input().split()
X = list[0]
Y = list[1]

price = X + Y/2
print(price)

Submission status: Runtime Error

Solution code:
list = input().split
X = list[0]
Y = list[1]

price = X + Y/2
print(price)

Submission status: Runtime Error

Solution code:
s=input();print(int(s[:2])+int(s[2:])//2)

Submission status: Runtime Error

Solution code:
print(eval(input().replace(' ','+0.5*'))

Submission status: Runtime Error

Solution code:
X,Y = map(int,input().split())
Y = Y/2
z = Z + Y
print(z)

Submission status: Runtime Error

Solution code:
#input one int
#a = int(input())

#input some val
#a, b, c = (int(i) for i in input().split())
#val = [[int(i) for i in input().split()] for i in range(N)]

#input matrix
#a = [input().split() for i in range()]

x, y = (int(i for i in input().split()))
print(x+(y/2))

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = [int(i) for i in input().split()]
H = list(map(int, input().split()))
compare = []

for i in range(N):
    kion = T - H[i]*0.006
    compare.append(abs(kion - A))
    Min = min(compare)
    #print('kion{}'.format(kion))
    #print('差：{}'.format(abs(kion - A)))
print(compare.index(Min)+1)
#print(T,A)
#print(H)
#print('compare:{}'.format(compare))

Submission status: Runtime Error

Solution code:
import numpy as np
def main():
    ttt = []
    n = int(input())
    N, M = map(int, input().split())
    e = list(map(int, input().split()))
    #e = [[int(i) for i in input().split()] for i in range(int(input()))]
    #n = 3
    #e = [[21,-11],[81234,94124,52141
    for j in range(n):
        t = N - e[j]*0.006
        tt = abs(M - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
main()

Submission status: Runtime Error

Solution code:
import numpy as np
def main():
    ttt = []
    n = int(input())
    N, M = map(int, input().split())
    e = list(map(int, input().split()))
    #e = [[int(i) for i in input().split()] for i in range(int(input()))]
    #n = 3
    #e = [[21,-11],[81234,94124,52141
    for j in range(n):
        t = N - e[j]*0.006
        tt = abs(M - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
main()

Submission status: Runtime Error

Solution code:
<>=~$";print+$'+$`/2,$/

Submission status: Runtime Error

Solution code:
a,b=int(input().split());print(a+b/2)

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = (int(x) for x in input().split())
altitude_list = [int(x) for x in input().split()]
dif_list = list(map(lambda x: abs(A - (T - x * 0.006)), altitude_list))
print(dif_list.index(min(dif_list)) + 1)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
aa = []
d = []
for i in range(b):
    k,kk = map(int,input().split())
    d.append([k, kk,i+1])

da = sorted(d)

kkk = da[0][0]
ll = 0
for i in range(b):
    kkkk = da[i][0]
    if kkk == kkkk:
        ll += 1
    else:
        kkk = kkkk
        ll = 1
    aa.append([da[i][2],da[i][0],ll])
aa.sort()

for i in aa:
    m = str(i[1])
    n = str(i[2])
    m = "0"*(6-len(m))+m
    n = "0"*(6-len(n))+n
    print(m+n)

Submission status: Runtime Error

Solution code:
import numpy as np

N, M = map(int, input().split())
P = [None] * (N+1)
Y = [None] * (N+1)
for i in range(M):
    p, y = map(int, input().split())
    P[i] = p
    Y[i] = y
P = np.array(P)
Y = np.array(Y)
PY = np.c_[P, Y]
sort_ind = np.argsort(Y)
PY_sort = PY[sort_ind]
count = [0] * (N+1)
id_list = [None] * (N+1)
for i, py in enumerate(PY_sort):
    count[py[0]] += 1
    id_list[i] = (str(py[0]).zfill(6) + str(count[py[0]]).zfill(6))
id_list = np.array(id_list)
id_list = id_list[np.argsort(sort_ind)]
for city_id in id_list:
    print(city_id)

Submission status: Runtime Error

Solution code:
import numpy as np
H, W, K = map(int, input().split())
p = 10**9 + 7
r = [1, 1, 2, 3, 5, 8, 13, 21, 34]
dp = np.zeros([H + 1, W], dtype=int)
dp[0, 0] = 1
for h in range(H):
    for w in range(W):
        if w != 0:
            dp[h+1, w] += ((dp[h, w-1] * r[w-1])%p * r[W-1-w])%p
        dp[h+1, w] += ((dp[h, w] * r[w])%p * r[W-1-w])%p
        if w != W-1:
            dp[h+1, w] += ((dp[h, w+1] * r[w])%p * r[W-2-w])%p
        dp[h+1, w] = dp[h+1, w]%p
print(dp[H, K-1])

Submission status: Runtime Error

Solution code:
x,y = map(int,input().split())
printint((x+y/2))

Submission status: Runtime Error

Solution code:
import numpy as np

n, m = list(map(int, input().split()))
mat = np.zeros((m, 2))
for i in range(m):
	mat[i, 0], mat[i, 1] = list(map(int, input().split()))
mat = np.c_[mat, np.array(range(m))]
mat = mat[mat[:, 1].argsort()]
cnt = np.zeros(m)
res = []
for i, j in mat[:, :2]:
	i = int(i)
	cnt[i] += 1
	res.append('{0:06d}{1:06d}'.format(i, int(cnt[i])))

for i in np.argsort(mat[:, 2]):
	print(res[int(i)])

Submission status: Runtime Error

Solution code:
nm=list(map(int,input().split()))
n=nm[0]
m=nm[1]
py=[]
y=[]
for i in range(m):
    py.append([])
for i in range (n):
    y.append([])
for i in range(m):
    py[i]=list(map(int,input().split()))
    y[py[i][0]-1].append(py[i][1])
for i in range(n):
    y[i].sort()
#print(py)
#print(y)
for i in range(m):
    if py[i][0]<10:
        print("00000"+str(py[i][0]*10**6+y[py[i][0]-1].index(py[i][1])+1))
    elif  py[i][0]<100:
        print("0000"+str(py[i][0]*10**6+y[py[i][0]-1].index(py[i][1])+1))
    elif py[i][0]<1000:
        print("000"+str(py[i][0]*10**6+y[py[i][0]-1].index(py[i][1])+1))
    elif py[i][0]<10000:
        print("00"+str(py[i][0]*10**6+y[py[i][0]-1].index(py[i][1])+1))
    elif py[i][0]<100000:
        print("0"+str(py[i][0]*10**6+y[py[i][0]-1].index(py[i][1])+1))
    else:
        print(str(py[i][0]*10**6+y[py[i][0]-1].index(py[i][1])+1))

Submission status: Runtime Error

Solution code:
a

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
data = [[int(i) for i in input().split()] for m in range(M)]
  
corresp = {}
for n in range(1, N+1):
    data_n = []
    for i in range(M):
        if data[i][0] == n:
            data_n.append(data[i])
    sort_n = sorted(data_n, key=lambda data_n_i: data_n_i[1])
    for k in range(len(sort_n)):
        corresp.update({str(sort_n[k]):k+1})
    

for i in range(M):
    print('{0:012d}'.format(data[i][0]*100000+corresp[str(data[i])]))

Submission status: Runtime Error

Solution code:

N, M = map(int, input().split())
data = [[int(i) for i in input().split()] for i in range(M)]
  
corresp = {}
for n in range(1, N+1):
    data_n = []
    for i in range(M):
        if data[i][0] == n:
            data_n.append(data[i])
    sort_n = sorted(data_n, key=lambda data_n_i: data_n_i[1])
    for k in range(len(sort_n)):
        corresp.update({str(sort_n[k]):k+1})
    

for i in range(M):
    print('{0:012d}'.format(data[i][0]*100000+corresp[str(data[i])]))

Submission status: Runtime Error

Solution code:

N, M = map(int, input().split())
data = []
for m in range(M):
  data.append(list(map(int, input().split())))

corresp = {}
for n in range(1, N+1):
    data_n = []
    for i in range(M):
        if data[i][0] == n:
            data_n.append(data[i])
    sort_n = sorted(data_n, key=lambda data_n_i: data_n_i[1])
    for k in range(len(sort_n)):
        corresp.update({str(sort_n[k]):k+1})
    

for i in range(M):
    print('{0:012d}'.format(data[i][0]*100000+corresp[str(data[i])]))

Submission status: Runtime Error

Solution code:

N, M = map(int, input().split())
data = []
for m in range(M):
  data.append(map(int, input().split()))
  
corresp = {}
for n in range(1, N+1):
    data_n = []
    for i in range(M):
        if data[i][0] == n:
            data_n.append(data[i])
    sort_n = sorted(data_n, key=lambda data_n_i: data_n_i[1])
    for k in range(len(sort_n)):
        corresp.update({str(sort_n[k]):k+1})
    

for i in range(M):
    print('{0:012d}'.format(data[i][0]*100000+corresp[str(data[i])]))

Submission status: Runtime Error

Solution code:
import numpy as np
def main():
	x  = 1000000007
	buf = input().split()
	h = int(buf[0])
	w = int(buf[1])
	k = int(buf[2])
 
	dpp = np.zeros((w+1, 3), dtype="int")
	dpp[0][0] = 1
	dpp[0][2] = 1
	dpp[1][0] = 1
	dpp[1][2] = 1
	for i in range(2, w+1):
		dpp[i][0] = dpp[i-1][0]+dpp[i-1][1]
		dpp[i][1] = dpp[i-1][0]
		dpp[i][2] = dpp[i][0] + dpp[i][1]
	#print(dpp)
 
	dp = np.zeros((h+1, w+2), dtype="int")
	dp[0][1] = 1
	for row in range(1, h+1):
		for col in range(1, w+1):
			dp[row][col] = ((dp[row-1][col-1]*dpp[col-2][2]*dpp[w-col][2])%x + (dp[row-1][col]*dpp[col-1][2]*dpp[w-col][2])%x + (dp[row-1][col+1]*dpp[col-1][2]*dpp[w-col-1][2])%x)%x
	#print(dp)
	print(dp[h][k]%x)
 
 
 
 
 
main()

Submission status: Runtime Error

Solution code:
import numpy as np

N, M = (int(i) for i in input().split())  


P = []
Y = []

for i in range(M):
    a, b = (int(i) for i in input().split())  
    P.append(a)
    Y.append(b)

#P = np.array(P)
Y = np.array(Y)

inds = np.argsort(Y)


result = {}
result2 = {}

for num, ind in enumerate(inds):
    if P[i] not in result:
        result[P[i]] = [ind]
    else:
        result[P[i]].append(ind)

    result2[ind] = "{:0=6}".format(P[i]) + "{:0=6}".format(P.index(P[i]))


for key in range(M):
    print(result2[key])

Submission status: Runtime Error

Solution code:
n, m = list(map(int, input().split()))
city_list = [[] for i in range(n)]

for i in range(m):
    pm, ym = list(map(int, input().split()))
    city_list[pm-1].append(ym)
city_list_copied = copy.deepcopy(city_list)

for i in range(n):
    city_list_copied[i].sort()
    for j in range(len(city_list[i])):
        cindex = sum(x <= city_list[i][j] for x in city_list[i])
        print("{:0=6}{:0=6}".format(i+1, cindex))

Submission status: Runtime Error

Solution code:
N,M=map(int,input().split())
PY=[]
for i in range(M):
    array=list(map(int,input().strip().split()))
    PY.append(array)

PY.sort()
city=0
order=0
for i in range(M):
    newcity=PY[i][0]
    if(newcity!=city):
        city=newcity
        order=1
    strcity=str(PY[i][0])
    strorder=str(order)
    upper='0'*(6-len(strcity))+strcity
    lower='0'*(6-len(strorder))+strorder
    order=order+1
    print(upper+lower)

Submission status: Runtime Error

Solution code:
list=input().split("\n")
number=int(list[0])
list_2=list[1].split(" ")
t=int(list_2[0])
a=int(list_2[1])
list_3=list[2].spilit(" ")
index=1
min=abs(a-(t-int(list_3[0])))
target_index=1
for height in list_3:
    temp=t-int(height)*0.006
    diff=abs(a-temp)
    if diff < min :
        min = diff
        target_index = index
    index += 1    
print(target_index)

Submission status: Runtime Error

Solution code:
num1 = int(input())
num2 = int(input())//2
print(num1+num2)

Submission status: Runtime Error

Solution code:
import math
n = int(input())
t,a = map(int,input().split())
hight = list(map(int, input().split()))
ans = 100000
ansnumber = 0

for num,i in enumerate(hight):
    tmp = math.fabs(t-i*0.006 - a)
    if ans > tmp:
         ans = tmp
         ansnumber = num+1

Submission status: Runtime Error

Solution code:
import math
n = int(input())
t,a = map(int,input().split())
hight = list(map(int, input().split()))
ans = 100000
ansnumber = 0
for num,i in enumerate(hight):
    tmp = math.fabs(i - a)
    if ans > tmp:
         ans = tmp
         ansnumber = num+1
print(ansnumber)

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())
city = [[] for _ in range(n+1)]
ret = ["" for _ in range(m)]
def createSix(s):
    while len(s) != 6:
        s = "0" + s
    return s
for i in range(m):
    a,b = map(int, input().split())
    city[a].append((b, i))
for i in range(m):
    city[i].sort()
print(city)
for i in range(n+1):
    for j in range(len(city[i])):
        ret[city[i][j][1]] = createSix(str(i)) + createSix(str(j+1))
for i in ret:
    print(i)

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())

p_list = []
y_list = []
shi_map = {}

for i in range(M):
    p, y = map(int, input().split())
    p_list.append(p)
    y_list.append(y)
    if p in shi_map:
        shi_map[p].append(y)
    else:
        shi_map[p] = [y]
shi_map2 = {}
for k, v in shi_map.items():
    v = sorted(v)
    shi_map2[k] = v

for i in range(M):
    p = p_list[i]
    y = y_list[i]
    j = shi_map2[p].index(y)
    p_str = str(p).zfill(6)
    j_str = str(j+1).zfill(6)
    print(p_str + j_str)

Submission status: Runtime Error

Solution code:
import copy
n, m = list(map(int, input().split()))
city_list = [[] for i in range(n)]
numbers = []

for i in range(m):
    pm, ym = list(map(int, input().split()))
    city_list[pm-1].append(ym)
city_list_copied = copy.deepcopy(city_list)

for i in range(n):
    city_list_copied[i].sort()
    for j in range(len(city_list[i])):
        cindex = city_list_copied[i].index(city_list[i][j])
        print("{:0=6}{:0=6}".format(i+1, cindex+1))

Submission status: Runtime Error

Solution code:
X = input()
Y = input()
print(X + (Y/2))

Submission status: Runtime Error

Solution code:
a, b = (int(i) for i in input().split())  
echo(a, b)

Submission status: Runtime Error

Solution code:
X,Y = int(input())
print(int(X+(1/2)*Y))

Submission status: Runtime Error

Solution code:
n=input()
t,a=input().split()
b=input().split()
n=int(n)
t=int(t)
a=int(a)
min=1000
for i in range(n):
     diff=abs(a-t+0.006*int(b[i]))
     if min>diff:
          id=i+1
          min=diff
print(id)

Submission status: Runtime Error

Solution code:
x,y = input().split
print(int(x)+int(y)/2)

Submission status: Runtime Error

Solution code:
#include <iostream>
using namespace std;
int main(void){
    int X,Y;
    cin >> X >> Y;
    cout << X+Y/2 << endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())
print(x + y/2)